Added Timeout to HttpClient to always be longer than the InvocationTimeoutMilliseconds.

HttpClient defaults to 100 seconds. If InvocationTimeoutMilliseconds is greater than the default of the HttpClient, the task will fail with a Task was canceled exception.
This commit is contained in:
Eric Green
2017-08-01 12:56:39 -05:00
committed by Steve Sanderson
parent 3715ec7c3f
commit 372e597f34

View File

@@ -50,6 +50,7 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels
options.DebuggingPort)
{
_client = new HttpClient();
_client.Timeout = TimeSpan.FromMilliseconds(options.InvocationTimeoutMilliseconds + 1000);
}
private static string MakeCommandLineOptions(int port)