Skip to content
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

Catch exception when subscribing to NetworkChange #94861

Conversation

rzikm
Copy link
Member

@rzikm rzikm commented Nov 16, 2023

Fixes #94794.

We can simply swallow the exception and not monitor network changes. RFC allows us to.

RFC: https://tools.ietf.org/html/rfc7838#section-2.2

When alternative services are used to send a client to the most
optimal server, a change in network configuration can result in
cached values becoming suboptimal. Therefore, clients SHOULD remove
from cache all alternative services that lack the "persist" flag with
the value "1" when they detect such a change, when information about
network state is available.

@ghost
Copy link

ghost commented Nov 16, 2023

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

Issue Details

Fixes #94794.

We can simply swallow the exception and not monitor network changes. RFC allows us to.

RFC: https://tools.ietf.org/html/rfc7838#section-2.2

When alternative services are used to send a client to the most
optimal server, a change in network configuration can result in
cached values becoming suboptimal. Therefore, clients SHOULD remove
from cache all alternative services that lack the "persist" flag with
the value "1" when they detect such a change, when information about
network state is available.

Author: rzikm
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@rzikm rzikm requested a review from a team November 16, 2023 18:20
Copy link
Member

@ManickaP ManickaP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

If we're gonna backport it, we should test it (including the cleanup code). Even if just manually with faking the exception for the sake of the test.

@rzikm
Copy link
Member Author

rzikm commented Nov 22, 2023

CI failures are unrelated

@rzikm rzikm merged commit d7b4695 into dotnet:main Nov 22, 2023
105 of 109 checks passed
@rzikm
Copy link
Member Author

rzikm commented Nov 22, 2023

/backport to release/8.0-staging

Copy link
Contributor

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

@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2023
@karelz karelz added this to the 9.0.0 milestone May 14, 2024
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.

NetworkInformationException: Permission denied (.NET 8 + Docker +GCloud)
6 participants