summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vrátil <dvratil@kde.org>2016-03-23 00:50:51 (GMT)
committerDaniel Vrátil <dvratil@kde.org>2016-08-15 20:01:12 (GMT)
commitc82fc387b450f08bbf87990d431476343a210a08 (patch)
treef4539007cc73640216a770c35c26190c22b8c803
parentb08d53682bee758e5004a5050363c1076ba17d24 (diff)
Manualy call Connection::reconnect() from Monitor
It sometimes happened that the server managed to deliver Hello response before we could connect to the commandReceived() signal. Now we first connect to the signal and then ask Connection to establish connection to the server.
-rw-r--r--src/core/monitor_p.cpp2
-rw-r--r--src/core/sessionthread.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/core/monitor_p.cpp b/src/core/monitor_p.cpp
index 7e4507f..31705c4 100644
--- a/src/core/monitor_p.cpp
+++ b/src/core/monitor_p.cpp
@@ -101,6 +101,8 @@ bool MonitorPrivate::connectToNotificationManager()
}
q_ptr->connect(ntfConnection, SIGNAL(commandReceived(qint64,Akonadi::Protocol::Command)),
q_ptr, SLOT(commandReceived(qint64,Akonadi::Protocol::Command)));
+ ntfConnection->reconnect();
+
return true;
}
diff --git a/src/core/sessionthread.cpp b/src/core/sessionthread.cpp
index a8827ad..d544fce 100644
--- a/src/core/sessionthread.cpp
+++ b/src/core/sessionthread.cpp
@@ -72,7 +72,6 @@ Connection *SessionThread::doCreateConnection(Connection::ConnectionType connTyp
this, [this](QObject *obj) {
mConnections.removeOne(static_cast<Connection*>(obj));
});
- conn->doReconnect(); // immediately try to connect
return conn;
}