-
Notifications
You must be signed in to change notification settings - Fork 893
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
Reconnect when DNS is restored #15506
Conversation
VLOG(2) << __func__ << " Should reconnect:" << reconnect_on_resume_; | ||
if (reconnect_on_resume_) { | ||
Connect(); | ||
reconnect_on_resume_ = false; |
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.
Instead of clearing reconnect_on_resme_
here, how about doing it in Connect()
?
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.
Connect
can be called from another places and drop this flag, this actually happens with need_reconnect_
in old solution
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.
Ok thanks!
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.
++
VLOG(2) << __func__ << " Should reconnect:" << reconnect_on_resume_; | ||
if (reconnect_on_resume_) { | ||
Connect(); | ||
reconnect_on_resume_ = false; |
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.
Ok thanks!
|
||
void BraveVpnService::OnDNSChanged() { | ||
if (!IsNetworkAvailable() || | ||
// This event is triggered before going to sleep while vpn is still |
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.
nti: I think comments should be located before the if clause
instead of between each condition.
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.
This comment explains why we add that second condition, will change in next PR
Resolves brave/brave-browser#25773
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: