the sack header needs to be removed from a nagle packet or a re-sent packet if there are no longer any unordered incoming packets

This commit is contained in:
Arvid Norberg 2012-10-20 14:53:54 +00:00
parent 134fa7b0fb
commit 63532b2c9b
1 changed files with 3 additions and 1 deletions

View File

@ -1710,7 +1710,9 @@ bool utp_socket_impl::send_pkt(int flags)
if (h->extension == 1)
{
sack = ptr[1];
if (m_inbuf.size() == 0 && h->ack_nr != m_ack_nr)
// if we no longer have any out-of-order packets waiting
// to be delivered, there's no selective ack to be sent.
if (m_inbuf.size() == 0)
{
// we need to remove the sack header
remove_sack_header(p);