Skip to content

Commit

Permalink
VPN-6228: Do not tear down tunnel if server becomes unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
lesleyjanenorton committed Apr 8, 2024
1 parent cf2aa13 commit 232cc45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,15 @@ void Controller::serverUnavailable() {
// to deactivate the VPN in the case of server location becoming unavailable
// because the user may not notice that they are no longer protected which can
// cause the traffic to leak outside the tunnel without their knowledge.
if (m_state == StateOn) {
if (m_state == StateOn || m_state == StateSilentSwitching ||
m_state == StateCheckSubscription) {
return;
}

m_nextStep = ServerUnavailable;

if (m_state == StateSwitching || m_state == StateConnecting ||
m_state == StateConfirming || m_state == StateCheckSubscription) {
m_state == StateConfirming) {
logger.info() << "Server location is unavailable and we are not in "
"StateOn. Deactivate!";
deactivate();
Expand Down

0 comments on commit 232cc45

Please sign in to comment.