Skip to content

Commit

Permalink
[Launcher] NuGet: 1 hour timeout instead of 100 seconds as a workarou…
Browse files Browse the repository at this point in the history
…nd for NuGet/Home#8120 (fixes stride3d#310)
  • Loading branch information
xen2 committed Jun 3, 2019
1 parent 89936b1 commit 6723f0c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sources/assets/Xenko.Core.Packages/NugetStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ public class NugetStore : INugetDownloadProgress
/// <param name="oldRootDirectory">The location of the Nuget store.</param>
public NugetStore(string oldRootDirectory)
{
// Workaround for https://github.com/NuGet/Home/issues/8120
// set timeout to something much higher than 100 sec
var defaultRequestTimeoutField = typeof(HttpSourceRequest).GetField(nameof(HttpSourceRequest.DefaultRequestTimeout), BindingFlags.Static | BindingFlags.Public);
if (defaultRequestTimeoutField != null)
{
defaultRequestTimeoutField.SetValue(null, TimeSpan.FromMinutes(60));
}

// Used only for versions before 3.0
this.oldRootDirectory = oldRootDirectory;

Expand Down

0 comments on commit 6723f0c

Please sign in to comment.