From 1cbd9a9d5e164da40e224e98ee02b0320c48d182 Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 7 Aug 2015 20:15:37 -0400 Subject: [PATCH] make ssthresh set less aggressive in uTP --- src/utp_stream.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utp_stream.cpp b/src/utp_stream.cpp index 141eca5b5..da8ebae5d 100644 --- a/src/utp_stream.cpp +++ b/src/utp_stream.cpp @@ -46,6 +46,9 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_UTP_LOG 0 #define TORRENT_VERBOSE_UTP_LOG 0 + +// the behavior of the sequence numbers as implemented by uTorrent is not +// particularly regular. This switch indicates the odd parts. #define TORRENT_UT_SEQ 1 #if TORRENT_UTP_LOG @@ -3377,7 +3380,7 @@ void utp_socket_impl::do_ledbat(const int acked_bytes, const int delay if (m_slow_start) { UTP_LOGV("%8p: off_target: %d slow_start -> 0\n", this, target_delay - delay); - m_ssthres = m_cwnd >> 16; + m_ssthres = (m_cwnd >> 16) / 2; m_slow_start = false; }