Skip to content

Commit

Permalink
WebSocket: Catch the cancellation of the loop in iterator.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcweber committed Mar 20, 2024
1 parent 6c29502 commit bb08667
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Providers.Core/Factory/WebSocketGremlinqClientFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ private async Task Loop(CancellationToken ct)
{
bytes = await _client.ReceiveAsync(ct);
}
catch (OperationCanceledException)

Check warning on line 338 in src/Providers.Core/Factory/WebSocketGremlinqClientFactory.cs

View check run for this annotation

Codecov / codecov/patch

src/Providers.Core/Factory/WebSocketGremlinqClientFactory.cs#L338

Added line #L338 was not covered by tests
{
return;

Check warning on line 340 in src/Providers.Core/Factory/WebSocketGremlinqClientFactory.cs

View check run for this annotation

Codecov / codecov/patch

src/Providers.Core/Factory/WebSocketGremlinqClientFactory.cs#L340

Added line #L340 was not covered by tests
}
catch (InvalidOperationException)
{
return;
Expand Down

0 comments on commit bb08667

Please sign in to comment.