From a86031160fb3273b1d861f56d66a2e5d191bfed5 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 13 May 2015 14:32:43 +0200 Subject: Stop time sync timer when disconnected. Improve debug --- daemon/watchconnector.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'daemon/watchconnector.cpp') 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()); -- cgit v1.2.3