Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix: don't log disposal cancellation as a resolution failure (#7940) - #7997

Open
sarthakshetty94 wants to merge 1 commit into
dotnet:mainfrom
sarthakshetty94:fix/service-endpoint-watcher-disposal-cancellation
Open

sarthakshetty94 wants to merge 1 commit into
dotnet:mainfrom
sarthakshetty94:fix/service-endpoint-watcher-disposal-cancellation

Conversation

@sarthakshetty94

@sarthakshetty94 sarthakshetty94 commented Dec 2, 2026 •

Copy link
Copy Markdown

Fixes #7940.

When ServiceEndpointWatcher is disposed during a background refresh, the resulting OperationCanceledException was logged as an Error ResolutionFailed (EventId 4) and the polling timer was rescheduled - so a normal shutdown looked like a resolution failure.

This change logs a Debug ResolutionCancelled (EventId 5) instead when the cancellation comes from disposal, and skips rescheduling the timer. The exception is still rethrown, so waiters observe the cancellation exactly as before, and genuine failures still log ResolutionFailed (covered by the second new test).

Tests: ServiceDiscovery suite on net8.0 - 52 pass / 0 fail. (Only net8.0 was run locally; CI covers the other TFMs.)

Microsoft Reviewers: Open in CodeFlow

@sarthakshetty94

Copy link
Copy Markdown
Author

/assign

@sarthakshetty94

Copy link
Copy Markdown
Author

@dotnet-policy-service agree — the user confirmed these are his personal submissions, no company involved.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ServiceEndpointWatcher logs normal cancellation as an error

1 participant