Finally fix reconnection logic
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 16 Apr 2013 21:06:57 +0000 (23:06 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 16 Apr 2013 21:08:10 +0000 (23:08 +0200)
Really, that part of the code needs a good old refactoring.

src/client/coreconnection.cpp

index ab42b74..7112b85 100644 (file)
@@ -352,7 +352,9 @@ void CoreConnection::disconnectFromCore()
 
 void CoreConnection::disconnectFromCore(const QString &errorString, bool wantReconnect)
 {
 
 void CoreConnection::disconnectFromCore(const QString &errorString, bool wantReconnect)
 {
-    if (!wantReconnect)
+    if (wantReconnect)
+        _reconnectTimer.start();
+    else
         _reconnectTimer.stop();
 
     _wantReconnect = wantReconnect; // store if disconnect was requested
         _reconnectTimer.stop();
 
     _wantReconnect = wantReconnect; // store if disconnect was requested