diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-18 17:30:14 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-18 17:30:14 +0100 |
commit | e9c4813dbb61b232c2dc12939cfc49764f41c311 (patch) | |
tree | 73debabcc528f9217923e05c3e4851894a6feee2 /common | |
parent | e7537b74789e431f3e5f3cea1ba635e9c9951918 (diff) | |
download | sink-e9c4813dbb61b232c2dc12939cfc49764f41c311.tar.gz sink-e9c4813dbb61b232c2dc12939cfc49764f41c311.zip |
setInterval doesn't stick
Diffstat (limited to 'common')
-rw-r--r-- | common/listener.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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 | |||
65 | 65 | ||
66 | m_checkConnectionsTimer = std::unique_ptr<QTimer>(new QTimer); | 66 | m_checkConnectionsTimer = std::unique_ptr<QTimer>(new QTimer); |
67 | m_checkConnectionsTimer->setSingleShot(true); | 67 | m_checkConnectionsTimer->setSingleShot(true); |
68 | m_checkConnectionsTimer->setInterval(std::chrono::milliseconds{1000}); | ||
69 | connect(m_checkConnectionsTimer.get(), &QTimer::timeout, [this]() { | 68 | connect(m_checkConnectionsTimer.get(), &QTimer::timeout, [this]() { |
70 | if (m_connections.isEmpty()) { | 69 | if (m_connections.isEmpty()) { |
71 | SinkTrace() << QString("No connections, shutting down."); | 70 | SinkTrace() << QString("No connections, shutting down."); |
@@ -189,7 +188,7 @@ void Listener::checkConnections() | |||
189 | if (m_connections.isEmpty()) { | 188 | if (m_connections.isEmpty()) { |
190 | loadResource().setLowerBoundRevision(std::numeric_limits<qint64>::max()); | 189 | loadResource().setLowerBoundRevision(std::numeric_limits<qint64>::max()); |
191 | } | 190 | } |
192 | m_checkConnectionsTimer->start(); | 191 | m_checkConnectionsTimer->start(std::chrono::milliseconds{1000}); |
193 | } | 192 | } |
194 | 193 | ||
195 | void Listener::onDataAvailable() | 194 | void Listener::onDataAvailable() |