Skip to content

Commit

Permalink
Continue to ack incoming uTP data while finalizing the connection
Browse files Browse the repository at this point in the history
  • Loading branch information
thrnz authored and arvidn committed Oct 23, 2022
1 parent 97997c3 commit 37f6647
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utp_stream.cpp
Expand Up @@ -3453,6 +3453,10 @@ bool utp_socket_impl::incoming_packet(span<std::uint8_t const> buf
// After that has happened we know the remote side has all our
// data, and we can gracefully shut down.

// we should still ack any incoming data to prevent potential
// timeouts/resends at the other end
if (ph->get_type() == ST_DATA) defer_ack();

if (consume_incoming_data(ph, ptr, payload_size, receive_time))
{
break;
Expand Down

0 comments on commit 37f6647

Please sign in to comment.