From 990b2d0989a209915d767852bd89b4017cdc32f2 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 13 May 2021 08:19:13 +0200 Subject: Kernel: Don't use delayed ACKs when establishing the connection When establishing the connection we should send ACKs right away so as to not delay the connection process. This didn't previously matter because we'd flush all delayed ACKs when NetworkTask waits for incoming packets. --- Kernel/Net/NetworkTask.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Kernel') diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp index 6618e7c889..774cbd6697 100644 --- a/Kernel/Net/NetworkTask.cpp +++ b/Kernel/Net/NetworkTask.cpp @@ -435,12 +435,12 @@ void handle_tcp(const IPv4Packet& ipv4_packet, const Time& packet_timestamp) switch (tcp_packet.flags()) { case TCPFlags::SYN: socket->set_ack_number(tcp_packet.sequence_number() + payload_size + 1); - send_delayed_tcp_ack(socket); + unused_rc = socket->send_ack(true); socket->set_state(TCPSocket::State::SynReceived); return; case TCPFlags::ACK | TCPFlags::SYN: socket->set_ack_number(tcp_packet.sequence_number() + payload_size + 1); - send_delayed_tcp_ack(socket); + unused_rc = socket->send_ack(true); socket->set_state(TCPSocket::State::Established); socket->set_setup_state(Socket::SetupState::Completed); socket->set_connected(true); -- cgit v1.2.3