From 7a16dcfe7253a07b1ba7c3ec66b737ef654183af Mon Sep 17 00:00:00 2001 From: Finn Williams Date: Mon, 10 Feb 2020 16:59:58 +0000 Subject: IVGCVSW-4424 Set minimum timeout for SendThread in WaitingForAck state Signed-off-by: Finn Williams Change-Id: Iee7de5040e355933b7e14a39d44e9d51b30427c8 --- src/profiling/SendThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/profiling/SendThread.cpp b/src/profiling/SendThread.cpp index d595c9d4a5..0318a74901 100644 --- a/src/profiling/SendThread.cpp +++ b/src/profiling/SendThread.cpp @@ -156,7 +156,7 @@ void SendThread::Send(IProfilingConnection& profilingConnection) std::unique_lock 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) -- cgit v1.2.1