-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set timeout when sending live console log to service #1903
Conversation
@@ -1,5 +1,4 @@ | |||
using GitHub.DistributedTask.WebApi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hide whitespace when reviewing.
@@ -274,7 +274,7 @@ public async Task AppendTimelineRecordFeedAsync(Guid scopeIdentifier, string hub | |||
} | |||
} | |||
|
|||
if (!pushedLinesViaWebsocket) | |||
if (!pushedLinesViaWebsocket && !cancellationToken.IsCancellationRequested) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failback to HttpClient only if we haven't been cancelled.
@@ -48,7 +48,7 @@ | |||
|
|||
<Target Name="Test" DependsOnTargets="GenerateConstant"> | |||
<Exec Command="dotnet build Test/Test.csproj -c $(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime)" ConsoleToMSBuild="true" /> | |||
<Exec Command="dotnet test Test/Test.csproj --no-build --logger:trx" ConsoleToMSBuild="true" /> | |||
<Exec Command="dotnet test Test/Test.csproj -c $(BUILDCONFIG) --no-build --logger:trx" ConsoleToMSBuild="true" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i noticed ./dev.sh test Release
is not working... this should fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The
websocketClient.SendAsync()
doesn't have a default timeout, which means if the WebSocket is in a bad state, the client (runner) won't abort the request until the service kills the connection after 10 minutes (Max connection time control by AFD).I am adding a CancellationToken to auto-fire after 60 seconds to avoid the runner sitting there and waiting for the 10 minutes timeout.