Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added more connection timeout logic to GetPackage

  • Loading branch information...
commit 0926f47396ed647305c6c7963c0b7865e41af0f2 1 parent 563cf10
@anurse anurse authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/NuGetGallery/Controllers/ApiController.cs
View
6 src/NuGetGallery/Controllers/ApiController.cs
@@ -96,6 +96,9 @@ public partial class ApiController : AppController
// The allow prerelease flag is ignored if both partialId and version are specified.
// In general we want to try to add download statistics for any package regardless of whether a version was specified.
+ // Only allow database requests to take up to 5 seconds. Any longer and we just lose the data; oh well.
+ EntitiesContext.SetCommandTimeout(5);
+
Package package = null;
try
{
@@ -118,9 +121,6 @@ public partial class ApiController : AppController
ProjectGuids = Request.Headers["NuGet-ProjectGuids"],
};
- // Only allow this to take up to 5 seconds. Any longer and we just lose the data; oh well.
- EntitiesContext.SetCommandTimeout(5);
-
PackageService.AddDownloadStatistics(stats);
}
catch (ReadOnlyModeException)
Please sign in to comment.
Something went wrong with that request. Please try again.