Skip to content
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

chore: swallow OperationCanceledException in transport #2508

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented Mar 6, 2023

This fixes the following which was shown when debugging a .NET program using Playwright and a playwright.close was happening.:

System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at System.Threading.CancellationToken.ThrowIfCancellationRequested()
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
   at System.IO.Pipes.PipeStream.ReadAsyncCore(Memory`1 destination, CancellationToken cancellationToken)
   at Microsoft.Playwright.Transport.StdIOTransport.GetResponseAsync(CancellationToken token) in /Users/maxschmitt/Developer/playwright-dotnet/src/Playwright/Transport/StdIOTransport.cs:line 161

when the driver was gracefully closed.

@mxschmitt mxschmitt merged commit a4b661b into main Mar 6, 2023
@mxschmitt mxschmitt deleted the swallow-canceled-exception branch March 6, 2023 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants