[DNS] Ignore ObjectDisposedException on CancellationToken Callback#115765
Merged
liveans merged 4 commits intodotnet:mainfrom May 20, 2025
Merged
[DNS] Ignore ObjectDisposedException on CancellationToken Callback#115765liveans merged 4 commits intodotnet:mainfrom
liveans merged 4 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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.
Contributor
|
Tagging subscribers to this area: @dotnet/ncl |
jkotas
reviewed
May 20, 2025
src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs
Outdated
Show resolved
Hide resolved
…olutionPal.Windows.cs Co-authored-by: Jan Kotas <jkotas@microsoft.com>
rzikm
reviewed
May 20, 2025
src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs
Outdated
Show resolved
Hide resolved
This was referenced May 20, 2025
Open
Member
Author
|
/azp run runtime-libraries-coreclr outerloop-windows |
|
Azure Pipelines successfully started running 1 pipeline(s). |
antonfirsov
approved these changes
May 20, 2025
Member
Author
|
Outerloop failures are unrelated |
jkotas
reviewed
May 20, 2025
src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs
Outdated
Show resolved
Hide resolved
…olutionPal.Windows.cs
Member
Author
|
/ba-g Failures unrelated |
Member
Author
|
/backport to release/9.0-staging |
Contributor
|
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/15165475339 |
Member
Author
|
/backport to release/8.0-staging |
Contributor
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/15165504525 |
This was referenced May 21, 2025
Merged
SimaTian
pushed a commit
that referenced
this pull request
May 27, 2025
…115765) * Ignore ObjectDisposedException on CancellationToken Callback * Update src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs Co-authored-by: Jan Kotas <jkotas@microsoft.com> * Change wording in comment --------- Co-authored-by: Jan Kotas <jkotas@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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