diff --git a/src/controller.cpp b/src/controller.cpp index 17afc120034..b581cb67599 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -943,7 +943,10 @@ bool Controller::activate(const ServerData& serverData, emit isDeviceConnectedChanged(); return false; } - m_isDeviceConnected = true; + if (!m_isDeviceConnected) { + m_isDeviceConnected = true; + emit isDeviceConnectedChanged(); + } // Before attempting to enable VPN connection we should check that the // subscription is active. diff --git a/src/controller.h b/src/controller.h index 7caebdc5cfa..5fe3df47353 100644 --- a/src/controller.h +++ b/src/controller.h @@ -111,7 +111,7 @@ class Controller : public QObject, public LogSerializer { Q_PROPERTY(bool silentServerSwitchingSupported READ silentServerSwitchingSupported CONSTANT); Q_PROPERTY(bool isDeviceConnected READ isDeviceConnected NOTIFY - isDeviceConnectedChanged); + isDeviceConnectedChanged); #ifdef MZ_DUMMY // This is just for testing purposes. Not exposed in prod.