-
Notifications
You must be signed in to change notification settings - Fork 35
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
Prevent endless rekey and tunnel update cycle #897
Conversation
Sources/NetworkProtection/Diagnostics/NetworkProtectionEntitlementMonitor.swift
Show resolved
Hide resolved
Task { | ||
do { | ||
if let delay { | ||
try await Task<Never, Never>.sleep(interval: delay) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be able to simplify this down to Task.sleep
I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if os(macOS) | ||
try? self.tokenStore.deleteToken() | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to check for system extension vs app extension here? I think it should be fine as-is, but checking anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if access is revoked it should be fine regardless. The only risk I see is if we get false positives as access-revoked, but then the problem would still not be this code, if that makes sense.
I'll merge this tomorrow, to allow the internal testing week. |
Task/Issue URL: https://app.asana.com/0/1207603085593419/1207806947583090/f BSK PR: duckduckgo/BrowserServicesKit#897 macOS PR: duckduckgo/macos-browser#2987 ## Description Prevents the following endless loop of calls `updateTunnel` > `rekey` > `updateTunnel` > `rekey`. This adds noise to our metrics and is unnecessary.
Task/Issue URL: https://app.asana.com/0/1207603085593419/1207806947583090/f BSK PR: duckduckgo/BrowserServicesKit#897 iOS PR: duckduckgo/iOS#3091 ## Description Prevents the following endless loop of calls `updateTunnel` > `rekey` > `updateTunnel` > `rekey`. This adds noise to our metrics and is unnecessary.
* main: Prevent endless rekey and tunnel update cycle (#897)
Task/Issue URL: https://app.asana.com/0/1207603085593419/1207806947583090/f
iOS PR: duckduckgo/iOS#3091
macOS PR: duckduckgo/macos-browser#2987
Description
Prevents the following endless loop of calls
updateTunnel
>rekey
>updateTunnel
>rekey
.This adds noise to our metrics and is unnecessary.
Testing
See platform-specific PRs for testing instructions.
Definition of Done:
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation