Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 655d729

Browse files
nosamimonojenkins
authored andcommitted
Timeout if the web request takes too long
1 parent 3f2a404 commit 655d729

File tree

1 file changed

+3
-1
lines changed
  • main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Scaffolding/Configuration

1 file changed

+3
-1
lines changed

main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Scaffolding/Configuration/ScaffoldingConfig.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ public static async Task<ScaffoldingConfig> LoadFromJsonAsync ()
7575
{
7676
if(fetchedConfig == null) {
7777
Stream stream;
78-
using var httpClient = new HttpClient ();
78+
using var httpClient = new HttpClient {
79+
Timeout = TimeSpan.FromSeconds (2)
80+
};
7981

8082
try {
8183
stream = await httpClient.GetStreamAsync (packageVersionsUrl);

0 commit comments

Comments
 (0)