From 8bae93ce181086769175e5c3fb0f0ef66fb9ca89 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 6 Nov 2026 03:01:46 +0100 Subject: Stop reading a connection a worker has taken over --- src/ot_tcp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ot_tcp.c') diff --git a/src/ot_tcp.c b/src/ot_tcp.c index 1351b92..f93795b 100644 --- a/src/ot_tcp.c +++ b/src/ot_tcp.c @@ -79,6 +79,11 @@ void tcp_read(const int64_t sock, struct ot_workstruct *ws) { ws->request = cookie->request.data; ws->request_size = (ssize_t)cookie->request.size; http_handle_request(sock, ws); + + /* A worker owns the connection now, and the buffer this loop reads hangs + off it, so there is nothing here left to look at */ + if (ws->handed_off) + return; #ifdef WANT_KEEPALIVE if (!ws->keep_alive) #endif -- cgit v1.3