Increase HttpClient Timeout in bootstrap script (#4659)
* Increase HttpClient Timeout in bootstrap script * Update dotnet-install.ps1 Fix comment
This commit is contained in:
parent
b918b2a6b6
commit
9855dc0088
1 changed files with 3 additions and 1 deletions
4
scripts/obtain/dotnet-install.ps1
vendored
4
scripts/obtain/dotnet-install.ps1
vendored
|
@ -144,7 +144,9 @@ function GetHTTPResponse([Uri] $Uri)
|
|||
else {
|
||||
$HttpClient = New-Object System.Net.Http.HttpClient
|
||||
}
|
||||
|
||||
# Default timeout for HttpClient is 100s. For a 50 MB download this assumes 500 KB/s average, any less will time out
|
||||
# 5 minutes allows it to work over much slower connections.
|
||||
$HttpClient.Timeout = New-TimeSpan -Minutes 5
|
||||
$Response = $HttpClient.GetAsync($Uri).Result
|
||||
if (($Response -eq $null) -or (-not ($Response.IsSuccessStatusCode)))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue