From 79087f6942931d92cf090343a7ec512541dfff23 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 30 Jan 2015 16:43:31 -0500 Subject: [PATCH] detect congesion for first message in sned queue only --- Streaming.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Streaming.cpp b/Streaming.cpp index 19f23f96..b69b2d48 100644 --- a/Streaming.cpp +++ b/Streaming.cpp @@ -560,13 +560,14 @@ namespace stream { if (ecode != boost::asio::error::operation_aborted) { - bool congesion = false; + bool congesion = false, first = true; std::vector packets; for (auto it : m_SentPackets) { it->numResendAttempts++; - if (it->numResendAttempts == 1) // detect congesion at first attempt only + if (first && it->numResendAttempts == 1) // detect congesion at first attempt of first packet only congesion = true; + first = false; if (it->numResendAttempts <= MAX_NUM_RESEND_ATTEMPTS) packets.push_back (it); else