Просмотр исходного кода

Kernel: Fix sign error in TCP resend logic

Ben Wiederhake 4 лет назад
Родитель
Сommit
25301e450a
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      Kernel/Net/TCPSocket.cpp

+ 1 - 2
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;