Repository navigation
[dotnet] [bidi] Don't propagate cancellation token for websocket - #17220
Conversation
Review Summary by QodoPrevent WebSocket cancellation in BiDi transport send operations
WalkthroughsDescription• Replace cancellation token with CancellationToken.None in WebSocket send operations • Prevents WebSocket transition to Aborted state during cancellation • Applies to both NET8_0_OR_GREATER and earlier framework versions File Changes1. dotnet/src/webdriver/BiDi/WebSocketTransport.cs
|
Code Review by Qodo
1. SendAsync ignores cancellationToken
|
There was a problem hiding this comment.
Pull request overview
Adjusts the .NET BiDi WebSocket transport send behavior to avoid transitioning the underlying ClientWebSocket into the Aborted state when a cancellation token is triggered during sends.
Changes:
- Passes
CancellationToken.NonetoClientWebSocket.SendAsynconNET8_0_OR_GREATER. - Passes
CancellationToken.NonetoClientWebSocket.SendAsyncon pre-.NET 8 (array-segment) path.
To avoid transition websocket to
Abortedstate.💥 What does this PR do?
This pull request makes a small change to how cancellation tokens are handled when sending data over a WebSocket in the
WebSocketTransport.csfile. The cancellation token has been replaced withCancellationToken.Noneto ensure that send operations are not cancelled prematurely.🔄 Types of changes