-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
UnobservedTaskException from QuicConnection that has not been disposed #112094
Comments
Can you share the exact repro code instead of code description please. Also just FYI you should always dispose the connection, even if you call close async. |
Here is the code to reproduce the problem I was having. (It's not a good code, but I wrote it the way I remembered it.)
|
I don't see this particular error in the log shared by Anton there. |
I meant the general "unobserved exceptions from System.Net.Quic" ala #80111, I didn't check for the specific stack. |
Description
I am developing a simple echo server application using System.Net.Quic.
After closing QuicConnection, if I do not Dispose, the following log is observed intermittently.
After changing the code to call DisposeAsync instead of CloseAsync on QuicConnection, the problem seems to have disappeared, but I am reporting this because I think this is a problematic behavior.
I think it might have to do with the following code related to connectedTcs:
Reproduction Steps
Open a bidirectional stream with QuicConnection on the client side, and have a Read loop in one thread and a Write loop in another thread.
Client intermittently closes the Connection.
Expected behavior
Internally handles QuicException.
Actual behavior
If I don't call Dispose(), an UnobservedTaskException occurs.
Regression?
No response
Known Workarounds
No response
Configuration
Other information
Looks like it's related to #80111
The text was updated successfully, but these errors were encountered: