From 7048eb1f5cd9045a40ff4e4aaaa6c29f425dda1c Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 2 May 2016 00:17:17 -0400 Subject: [PATCH] be more conservative in marking packets as mtu-probes (#689) --- src/utp_stream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utp_stream.cpp b/src/utp_stream.cpp index 2f54e2e31..f85412ef3 100644 --- a/src/utp_stream.cpp +++ b/src/utp_stream.cpp @@ -1754,7 +1754,7 @@ private: // send_pkt() again) // returns true if there is more space for payload in our // congestion window, false if there is no more space. -bool utp_socket_impl::send_pkt(int flags) +bool utp_socket_impl::send_pkt(int const flags) { #ifdef TORRENT_EXPENSIVE_INVARIANT_CHECKS INVARIANT_CHECK; @@ -2033,7 +2033,7 @@ bool utp_socket_impl::send_pkt(int flags) // for ST_DATA packets, payload size is 0. Such packets do not have unique // sequence numbers and should never be used as mtu probes - if ((mtu_probe || p->mtu_probe) && payload_size > 0) + if ((mtu_probe || p->mtu_probe) && payload_size > m_mtu_floor) { p->mtu_probe = true; m_mtu_seq = m_seq_nr;