summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-03-18 17:13:10 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-03-18 17:13:10 +0100
commite7537b74789e431f3e5f3cea1ba635e9c9951918 (patch)
tree1b4e89264093a159074b4e67c756d9b065dc3c26
parentf5e522bb48caa5dd002a7dbaf830e88406bf6788 (diff)
downloadsink-e7537b74789e431f3e5f3cea1ba635e9c9951918.tar.gz
sink-e7537b74789e431f3e5f3cea1ba635e9c9951918.zip
On mac 1s is not enough, so give plenty of time on the first start.
-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