From 5ed34cc52a87813e9ea92baf41c3f800dc76909e Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 30 Mar 2014 09:02:43 -0400 Subject: [PATCH] fixed race condition --- Streaming.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Streaming.cpp b/Streaming.cpp index bf8eacd3..facf68b4 100644 --- a/Streaming.cpp +++ b/Streaming.cpp @@ -60,7 +60,8 @@ namespace stream } // send ack for last message - SendQuickAck (); + if (m_IsOpen) + SendQuickAck (); } else { @@ -127,9 +128,9 @@ namespace stream if (flags & PACKET_FLAG_CLOSE) { LogPrint ("Closed"); + SendQuickAck (); // send ack for close explicitly? m_IsOpen = false; m_ReceiveQueue.WakeUp (); - m_ReceiveTimer.cancel (); } }