Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 372e597

Browse files
ericgreenmixSteveSandersonMS
authored andcommitted
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.
1 parent 3715ec7 commit 372e597

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Microsoft.AspNetCore.NodeServices/HostingModels/HttpNodeInstance.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public HttpNodeInstance(NodeServicesOptions options, int port = 0)
5050
options.DebuggingPort)
5151
{
5252
_client = new HttpClient();
53+
_client.Timeout = TimeSpan.FromMilliseconds(options.InvocationTimeoutMilliseconds + 1000);
5354
}
5455

5556
private static string MakeCommandLineOptions(int port)

0 commit comments

Comments
 (0)