diff options
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Net/TCPSocket.cpp | 5 | ||||
-rw-r--r-- | Kernel/Net/TCPSocket.h | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp index 0ab25c643d..8e114ddfa5 100644 --- a/Kernel/Net/TCPSocket.cpp +++ b/Kernel/Net/TCPSocket.cpp @@ -190,7 +190,7 @@ void TCPSocket::send_tcp_packet(u16 flags, const void* payload, size_t payload_s if (tcp_packet.has_syn() || payload_size > 0) { LOCKER(m_not_acked_lock); - m_not_acked.append({ m_sequence_number, move(buffer), 0, {} }); + m_not_acked.append({ m_sequence_number, move(buffer) }); send_outgoing_packets(); return; } @@ -217,9 +217,8 @@ void TCPSocket::send_outgoing_packets() for (auto& packet : m_not_acked) { timeval diff; timeval_sub(packet.tx_time, now, diff); - if (diff.tv_sec < 1 && diff.tv_usec <= 500000) + if (diff.tv_sec == 0 && diff.tv_usec <= 500000) continue; - packet.tx_time = now; packet.tx_counter++; diff --git a/Kernel/Net/TCPSocket.h b/Kernel/Net/TCPSocket.h index 87f5871d40..22cf796225 100644 --- a/Kernel/Net/TCPSocket.h +++ b/Kernel/Net/TCPSocket.h @@ -192,10 +192,10 @@ private: u32 m_bytes_out { 0 }; struct OutgoingPacket { - u32 ack_number; + u32 ack_number { 0 }; ByteBuffer buffer; int tx_counter { 0 }; - timeval tx_time; + timeval tx_time { 0, 0 }; }; Lock m_not_acked_lock { "TCPSocket unacked packets" }; |