Increase HttpClient Timeout in bootstrap script (#4659)

* Increase HttpClient Timeout in bootstrap script

* Update dotnet-install.ps1

Fix comment
This commit is contained in:
Matt Galbraith 2016-11-08 23:23:46 -08:00 committed by Piotr Puszkiewicz
parent b918b2a6b6
commit 9855dc0088

View file

@ -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)))
{