-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[DNS] Ignore ObjectDisposedException on CancellationToken Callback #115765
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
Conversation
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.
Pull Request Overview
This PR modifies the cancellation registration logic for DNS resolution to ignore ObjectDisposedException, addressing reported issues from two customers.
- Added a catch block for ObjectDisposedException in RegisterForCancellation.
- Updated commentary to clarify that the handle is already released and the exception can be safely ignored.
|
Tagging subscribers to this area: @dotnet/ncl |
src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs
Outdated
Show resolved
Hide resolved
…olutionPal.Windows.cs Co-authored-by: Jan Kotas <[email protected]>
src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs
Outdated
Show resolved
Hide resolved
rzikm
left a comment
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, with a nit.
|
/azp run runtime-libraries-coreclr outerloop-windows |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Outerloop failures are unrelated |
src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs
Outdated
Show resolved
Hide resolved
…olutionPal.Windows.cs
|
/ba-g Failures unrelated |
|
/backport to release/9.0-staging |
|
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/15165475339 |
|
/backport to release/8.0-staging |
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/15165504525 |
…115765) * Ignore ObjectDisposedException on CancellationToken Callback * Update src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs Co-authored-by: Jan Kotas <[email protected]> * Change wording in comment --------- Co-authored-by: Jan Kotas <[email protected]>
Reported by 2 customers.
Previously, there was a lock on this codepath, but it has been removed since .NET 7.0, deleted in #63904 to handle different issue