summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2015-05-13 14:32:43 +0200
committerAndrew Branson <andrew.branson@cern.ch>2015-05-13 14:32:43 +0200
commita86031160fb3273b1d861f56d66a2e5d191bfed5 (patch)
tree43228abb59a4fa2626e1acfe8196972226ad71a4
parent67670934bef4ac7f41e6bc336f0ad9516fe2b28d (diff)
Stop time sync timer when disconnected. Improve debug
-rw-r--r--daemon/watchconnector.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/daemon/watchconnector.cpp b/daemon/watchconnector.cpp
index 04e9ceb..0b0bca1 100644
--- a/daemon/watchconnector.cpp
+++ b/daemon/watchconnector.cpp
@@ -155,7 +155,7 @@ void WatchConnector::disconnect()
socket->deleteLater();
reconnectTimer.stop();
timeSyncTimer.stop();
- qCDebug(l) << "stopped reconnect timer";
+ qCDebug(l) << "stopped timers";
}
void WatchConnector::handleWatch(const QString &name, const QString &address)
@@ -337,7 +337,7 @@ void WatchConnector::onDisconnected()
if (not writeData.isEmpty() && reconnectTimer.interval() > RECONNECT_TIMEOUT) {
writeData.clear(); // 3rd time around - user is not here, do not bother with resending last message
}
-
+ timeSyncTimer.stop();
scheduleReconnect();
}
@@ -481,6 +481,7 @@ void WatchConnector::ping(uint cookie)
void WatchConnector::time()
{
+ qCDebug(l) << "Synchronizing time";
timeSyncTimer.stop();
QByteArray res;
QDateTime UTC(QDateTime::currentDateTimeUtc());