From e9c4813dbb61b232c2dc12939cfc49764f41c311 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 18 Mar 2018 17:30:14 +0100 Subject: setInterval doesn't stick --- common/listener.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'common') diff --git a/common/listener.cpp b/common/listener.cpp index 656677b..d580327 100644 --- a/common/listener.cpp +++ b/common/listener.cpp @@ -65,7 +65,6 @@ Listener::Listener(const QByteArray &resourceInstanceIdentifier, const QByteArra m_checkConnectionsTimer = std::unique_ptr(new QTimer); m_checkConnectionsTimer->setSingleShot(true); - m_checkConnectionsTimer->setInterval(std::chrono::milliseconds{1000}); connect(m_checkConnectionsTimer.get(), &QTimer::timeout, [this]() { if (m_connections.isEmpty()) { SinkTrace() << QString("No connections, shutting down."); @@ -189,7 +188,7 @@ void Listener::checkConnections() if (m_connections.isEmpty()) { loadResource().setLowerBoundRevision(std::numeric_limits::max()); } - m_checkConnectionsTimer->start(); + m_checkConnectionsTimer->start(std::chrono::milliseconds{1000}); } void Listener::onDataAvailable() -- cgit v1.2.3