Set connection limit for google endpoint (#628)
This commit is contained in:
Родитель
e65e78fb56
Коммит
c7386a410e
|
@ -158,11 +158,13 @@ namespace Diagnostics.RuntimeHost.Services
|
|||
|
||||
private void InitializeHttpClient()
|
||||
{
|
||||
_httpClient = new HttpClient
|
||||
var handler = new HttpClientHandler
|
||||
{
|
||||
MaxResponseContentBufferSize = Int32.MaxValue,
|
||||
Timeout = TimeSpan.FromSeconds(3)
|
||||
MaxConnectionsPerServer = 10 // Set only max of 10 concurrent connections to google endpoint.
|
||||
};
|
||||
_httpClient = new HttpClient(handler);
|
||||
_httpClient.MaxResponseContentBufferSize = Int32.MaxValue;
|
||||
_httpClient.Timeout = TimeSpan.FromSeconds(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче