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

Unobserved exception for socket read operations #770

Closed
nmandzyk opened this issue May 8, 2023 · 0 comments · Fixed by #836
Closed

Unobserved exception for socket read operations #770

nmandzyk opened this issue May 8, 2023 · 0 comments · Fixed by #836

Comments

@nmandzyk
Copy link
Contributor

nmandzyk commented May 8, 2023

We configured FIX client (initiator) and it doesn't crash or log any exceptions but we use Sentry.io for issue detection and it catches a lot of unobserved exceptions like this one:

`System.Net.Sockets.SocketException: Operation canceled
System.IO.IOException: Unable to read data from the transport connection: Operation canceled.
?, in void AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
?, in int AwaitableSocketAsyncEventArgs.GetResult(short token)
?, in async ValueTask SslStream.ReadAsyncInternal(TIOAdapter adapter, Memory buffer)

System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Unable to read data from the transport connection: Operation canceled.)`

nmandzyk pushed a commit to nmandzyk/quickfixn that referenced this issue May 8, 2023
…asynchronous pattern (TAP) instead of Asynchronous Programming Model (APM)

- fix unobserved  SocketException
nmandzyk added a commit to nmandzyk/quickfixn that referenced this issue May 8, 2023
…asynchronous pattern (TAP) instead of Asynchronous Programming Model (APM)

- fix unobserved  SocketException
gbirchmeier pushed a commit to gbirchmeier/quickfixn that referenced this issue Feb 14, 2024
resolves connamara#770 (original issue)
resolves connamara#771 (original PR, this is a rebase)

Perform socket read operations according to Task-based asynchronous pattern (TAP) instead of Asynchronous Programming Model (APM)
gbirchmeier pushed a commit to gbirchmeier/quickfixn that referenced this issue Feb 21, 2024
resolves connamara#770 (original issue)
resolves connamara#771 (original PR, this is a rebase)

Perform socket read operations according to Task-based asynchronous pattern (TAP) instead of Asynchronous Programming Model (APM)

Also cleanup/nullable-ize SocketInitiatorThread (this part by @gbirchmeier)
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 a pull request may close this issue.

1 participant