summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/listener.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/listener.cpp b/common/listener.cpp
index 9922c48..656677b 100644
--- a/common/listener.cpp
+++ b/common/listener.cpp
@@ -65,14 +65,15 @@ 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(1000); 68 m_checkConnectionsTimer->setInterval(std::chrono::milliseconds{1000});
69 connect(m_checkConnectionsTimer.get(), &QTimer::timeout, [this]() { 69 connect(m_checkConnectionsTimer.get(), &QTimer::timeout, [this]() {
70 if (m_connections.isEmpty()) { 70 if (m_connections.isEmpty()) {
71 SinkTrace() << QString("No connections, shutting down."); 71 SinkTrace() << QString("No connections, shutting down.");
72 quit(); 72 quit();
73 } 73 }
74 }); 74 });
75 m_checkConnectionsTimer->start(); 75 //Give plenty of time during the first start.
76 m_checkConnectionsTimer->start(std::chrono::milliseconds{60000});
76 77
77 // TODO: experiment with different timeouts 78 // TODO: experiment with different timeouts
78 // or even just drop down to invoking the method queued? => invoke queued unless we need throttling 79 // or even just drop down to invoking the method queued? => invoke queued unless we need throttling