Blob Blame History Raw
--- a/applet/networkmanager.cpp
+++ b/applet/networkmanager.cpp
@@ -1039,8 +1039,9 @@
             break;
         case Knm::InterfaceConnection::Unknown:
             m_activeVpnConnections.remove(id);
-            if (oldState == Knm::InterfaceConnection::Activated && m_totalActiveVpnConnections > 0)
+            if (oldState >= Knm::InterfaceConnection::Activated && m_totalActiveVpnConnections > 0) {
                 m_totalActiveVpnConnections--;
+            }
             break;
     }
     //kDebug() << newState << m_totalActiveVpnConnections;
--- a/libs/internals/interfaceconnection.h
+++ b/libs/internals/interfaceconnection.h
@@ -48,7 +48,7 @@
 public:
     friend class InterfaceConnectionBuilder;
 
-    enum ActivationState { Unknown, Activating, Activated };
+    enum ActivationState { Unknown, Activating, Activated, Deactivating, Deactivated };
 
 
     // To create an object of InterfaceConnection class please use