Skip to content

Commit

Permalink
Re-added: Resolve Windows Proxy at Boot for Faster 1st Web Request
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Aug 9, 2022
1 parent 3b05d52 commit 033a5aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/Reloaded.Mod.Launcher/ModuleInitialiser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ public static void Init()
{
// Raise maximum number of WebRequest connections
ServicePointManager.DefaultConnectionLimit = int.MaxValue;

// When .NET makes first HTTP request, it takes some time to resolve proxy settings.
// We can speed this up by resolving the proxy ourselves.
Task.Run(WebRequest.GetSystemWebProxy);
}
}

0 comments on commit 033a5aa

Please sign in to comment.