fix: always schedule uTP ack after receiving a packet (#6508)
* fix: always schedule uTP ack after receiving a packet
* chore: add comment to explain change
(cherry picked from commit 0ce4adf07c
)
This commit is contained in:
parent
d5a555c6bb
commit
64b87b376f
|
@ -726,13 +726,10 @@ void tr_peerIo::utp_init([[maybe_unused]] struct_utp_context* ctx)
|
|||
io->set_enabled(TR_DOWN, true);
|
||||
io->can_read_wrapper();
|
||||
|
||||
// utp_read_drained() notifies libutp that this read buffer is empty.
|
||||
// utp_read_drained() notifies libutp that we read a packet from them.
|
||||
// It opens up the congestion window by sending an ACK (soonish) if
|
||||
// one was not going to be sent.
|
||||
if (std::empty(io->inbuf_))
|
||||
{
|
||||
utp_read_drained(args->socket);
|
||||
}
|
||||
utp_read_drained(args->socket);
|
||||
}
|
||||
return {};
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue