1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

Kernel: Fix sign error in TCP resend logic

This commit is contained in:
Ben Wiederhake 2021-02-28 03:05:03 +01:00 committed by Andreas Kling
parent 5c15ca7b84
commit 25301e450a

View file

@ -242,8 +242,7 @@ void TCPSocket::send_outgoing_packets()
LOCKER(m_not_acked_lock, Lock::Mode::Shared);
for (auto& packet : m_not_acked) {
// FIXME: This doesn't look correct to me. Bug?
auto diff = packet.tx_time - now;
auto diff = now - packet.tx_time;
if (diff <= Time::from_nanoseconds(500'000'000))
continue;
packet.tx_time = now;