Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sakno committed May 3, 2024
1 parent 935a378 commit 87ec140
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ private async void HandleConnection(ConnectionContext connection, int transmissi
// reset by client
logger.ConnectionWasResetByClient(clientAddress);
}
catch (OperationCanceledException) when (tokenSource is not null && tokenSource.CancellationOrigin == connection.ConnectionClosed)
catch (OperationCanceledException) when (tokenSource?.CancellationOrigin == connection.ConnectionClosed)
{
// closed by client
logger.ConnectionWasResetByClient(clientAddress);
}
catch (OperationCanceledException) when (tokenSource is not null && tokenSource.CancellationOrigin == lifecycleToken)
catch (OperationCanceledException) when (tokenSource?.CancellationOrigin == lifecycleToken)
{
// server stopped, suppress exception
}
Expand Down

0 comments on commit 87ec140

Please sign in to comment.