From 84fcc0baf0cbb8f05d9f562bd5e4c2f6eab51a96 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 12 Sep 2013 11:28:54 +0000 Subject: [PATCH] merged utp fix from RC_0_16 --- ChangeLog | 1 + src/utp_stream.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f00f1a55d..c05a49957 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ * fix uTP edge case where udp socket buffer fills up * fix nagle implementation in uTP + * uTP performance improvement. only fast retransmit one packet at a time * improve error message for 'file too short' * fix piece-picker stat bug when only selecting some files for download * fix bug in async_add_torrent when settings file_priorities diff --git a/src/utp_stream.cpp b/src/utp_stream.cpp index 6c72b6f19..7ff1a7333 100644 --- a/src/utp_stream.cpp +++ b/src/utp_stream.cpp @@ -110,7 +110,12 @@ enum // the max number of packets to fast-resend per // selective ack message - sack_resend_limit = 3, + // only re-sending a single packet per sack + // appears to improve performance by making it + // less likely to loose the re-sent packet. Because + // when that happens, we must time-out in order + // to continue, which takes a long time. + sack_resend_limit = 1, }; // compare if lhs is less than rhs, taking wrapping