summaryrefslogtreecommitdiff
path: root/kernel/network/tcp.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-07-04 20:09:51 +0200
committerAnton Kling <anton@kling.gg>2024-07-04 20:10:47 +0200
commitafc2b4d4766b0e4ee8519ac6fcd98353d3864322 (patch)
tree65094046734586e5f2da5d553305103ebb87a34f /kernel/network/tcp.c
parentf89eef4733b7905dbf362cbde9aebb2dd0dcfe7d (diff)
TCP: Allow delay for sends
This is not at all optimal for applications that already buffer their data but can have a huge impact on those that don't. Applications that don't wish to use this should disable this for their socket.
Diffstat (limited to 'kernel/network/tcp.c')
-rw-r--r--kernel/network/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/network/tcp.c b/kernel/network/tcp.c
index acdbdb3..6bec93e 100644
--- a/kernel/network/tcp.c
+++ b/kernel/network/tcp.c
@@ -288,7 +288,7 @@ void handle_tcp(ipv4_t src_ip, ipv4_t dst_ip, const u8 *payload,
}
if (tcp_payload_length > 0) {
if (tcp_payload_length > ringbuffer_unused(&con->incoming_buffer)) {
- return;
+ break;
}
int rc = ringbuffer_write(&con->incoming_buffer, tcp_payload,
tcp_payload_length);