From 25301e450a12c1d6fa8436c5c4b2492257ac9db4 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sun, 28 Feb 2021 03:05:03 +0100 Subject: [PATCH] Kernel: Fix sign error in TCP resend logic --- Kernel/Net/TCPSocket.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp index e3f72746156..321ae0e1dab 100644 --- a/Kernel/Net/TCPSocket.cpp +++ b/Kernel/Net/TCPSocket.cpp @@ -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;