IVGCVSW-4424 Set minimum timeout for SendThread in WaitingForAck state
authorFinn Williams <Finn.Williams@arm.com>
Mon, 10 Feb 2020 16:59:58 +0000 (16:59 +0000)
committerFinn Williams <Finn.Williams@arm.com>
Mon, 10 Feb 2020 16:59:58 +0000 (16:59 +0000)
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: Iee7de5040e355933b7e14a39d44e9d51b30427c8

src/profiling/SendThread.cpp

index d595c9d..0318a74 100644 (file)
@@ -156,7 +156,7 @@ void SendThread::Send(IProfilingConnection& profilingConnection)
                 std::unique_lock<std::mutex> lock(m_WaitMutex);
 
                 bool timeout = m_WaitCondition.wait_for(lock,
-                                                        std::chrono::milliseconds(m_Timeout),
+                                                        std::chrono::milliseconds(std::max(m_Timeout, 1000)),
                                                         [&]{ return m_ReadyToRead; });
                 // If we get notified we need to flush the buffer again
                 if(timeout)