[DNS] Ignore ObjectDisposedException on CancellationToken Callback#115765
[DNS] Ignore ObjectDisposedException on CancellationToken Callback#115765liveans merged 4 commits intodotnet:mainfrom
Conversation
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.
|
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
|
/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