From ee1e66e851f6ee4e4337c2141f0327fcedc402e9 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 31 Dec 2018 15:18:22 +0100 Subject: [PATCH] don't leave slow-start just because we hit the advertized receive window. uTorrent adjusts its receive window dynamically which may just cause a temporary restriction --- src/utp_stream.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utp_stream.cpp b/src/utp_stream.cpp index 0dfbbdc53..b4915135b 100644 --- a/src/utp_stream.cpp +++ b/src/utp_stream.cpp @@ -3577,13 +3577,15 @@ void utp_socket_impl::do_ledbat(const int acked_bytes, const int delay , static_cast(this), m_mtu, in_flight, int(m_adv_wnd), int(m_cwnd >> 16), acked_bytes); m_cwnd_full = false; } - +/* if ((m_cwnd >> 16) >= m_adv_wnd) { m_slow_start = false; + m_ssthres = (m_cwnd >> 16); UTP_LOGV("%8p: cwnd > advertized wnd (%d) slow_start -> 0\n" , static_cast(this), m_adv_wnd); } +*/ } void utp_stream::bind(endpoint_type const&, error_code&) { }