Skip to content
Permalink
Browse files

[Launcher] NuGet: 1 hour timeout instead of 100 seconds as a workarou…

…nd for NuGet/Home#8120 (fixes #310)
  • Loading branch information
xen2 committed Jun 3, 2019
1 parent 89936b1 commit 6723f0cd54feb5e8e786e486da4b8cda16cd5b97
Showing with 8 additions and 0 deletions.
  1. +8 −0 sources/assets/Xenko.Core.Packages/NugetStore.cs
@@ -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;

0 comments on commit 6723f0c

Please sign in to comment.
You can’t perform that action at this time.