-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
wrap exceptions from callbacks in QuicError.CallbackError #88614
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue Detailscontributes to #75115. I also added test for scenario described in #75115 e.g. ODE leaking up but not stopping listener.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a downside of wrapping the callback calls with extra try-catch block? Or why did you chose to introduce the extra boolean?
I generally consider trow catch expensive operation. But I don't have any numbers for this particular case. And personally I'm not fan of too much of nesting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo comments, thanks.
src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs
Outdated
Show resolved
Hide resolved
counter test failure looks unrelated. |
contributes to #75115.
It uses newly approved
QuicError.CallbackError
to make it clear what is coming from outside of coreQuic
.I was originally thinking about inner try/catch but I decided too keep simple state variable to track if exception needs to be wrapped to keep it simple.
I also added test for scenario described in #75115 e.g. ODE leaking up but not stopping listener.