Skip to content

Commit

Permalink
Revert "Fix potential Debug.Assert in QuicListener (#103965)" (#104154)
Browse files Browse the repository at this point in the history
This reverts commit 2fab73c.
  • Loading branch information
rzikm authored Jun 28, 2024
1 parent bcffebf commit 75b2501
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ private async void StartConnectionHandshake(QuicConnection connection, SslClient
// https://github.com/microsoft/msquic/discussions/2705.
// This will be assigned to before the linked CTS is cancelled
TimeSpan handshakeTimeout = QuicDefaults.HandshakeTimeout;
using CancellationTokenSource linkedCts = CancellationTokenSource.CreateLinkedTokenSource(_disposeCts.Token, connection.ConnectionShutdownToken);
try
{
using CancellationTokenSource linkedCts = CancellationTokenSource.CreateLinkedTokenSource(_disposeCts.Token, connection.ConnectionShutdownToken);
cancellationToken = linkedCts.Token;
// Initial timeout for retrieving connection options.
linkedCts.CancelAfter(handshakeTimeout);
Expand All @@ -249,7 +249,7 @@ private async void StartConnectionHandshake(QuicConnection connection, SslClient
await connection.DisposeAsync().ConfigureAwait(false);
}
}
catch (OperationCanceledException) when (connection.ConnectionShutdownToken.IsCancellationRequested && !linkedCts.IsCancellationRequested)
catch (OperationCanceledException) when (connection.ConnectionShutdownToken.IsCancellationRequested)
{
// Connection closed by peer
if (NetEventSource.Log.IsEnabled())
Expand Down

0 comments on commit 75b2501

Please sign in to comment.