Skip to content

Conversation

@liveans
Copy link
Member

@liveans liveans commented May 20, 2025

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

Copilot AI review requested due to automatic review settings May 20, 2025 07:13
Copy link
Contributor

Copilot AI left a 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.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@rzikm rzikm left a 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.

@liveans
Copy link
Member Author

liveans commented May 20, 2025

/azp run runtime-libraries-coreclr outerloop-windows

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liveans
Copy link
Member Author

liveans commented May 20, 2025

Outerloop failures are unrelated

@liveans liveans enabled auto-merge (squash) May 20, 2025 16:20
@liveans
Copy link
Member Author

liveans commented May 20, 2025

/ba-g Failures unrelated

@liveans liveans merged commit 87143d9 into dotnet:main May 20, 2025
83 of 85 checks passed
@liveans
Copy link
Member Author

liveans commented May 21, 2025

/backport to release/9.0-staging

@github-actions
Copy link
Contributor

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/15165475339

@liveans
Copy link
Member Author

liveans commented May 21, 2025

/backport to release/8.0-staging

@github-actions
Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/15165504525

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 <[email protected]>

* Change wording in comment

---------

Co-authored-by: Jan Kotas <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants