Fix advertised window being counted twice in congestion check

This commit is contained in:
V.G. Bulavintsev 2018-02-28 11:50:41 +01:00 committed by Arvid Norberg
parent 9d83da110b
commit bf2f0a9c55
1 changed files with 1 additions and 1 deletions

View File

@ -1830,7 +1830,7 @@ bool utp_socket_impl::send_pkt(int const flags)
// congestion window and the advertised receive window from // congestion window and the advertised receive window from
// the other end. // the other end.
if (m_bytes_in_flight + payload_size > (std::min)(int(m_cwnd >> 16) if (m_bytes_in_flight + payload_size > (std::min)(int(m_cwnd >> 16)
, int(m_adv_wnd - m_bytes_in_flight))) , int(m_adv_wnd)))
{ {
// this means there's not enough room in the send window for // this means there's not enough room in the send window for
// another packet. We have to hold off sending this data. // another packet. We have to hold off sending this data.