diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-06 03:01:46 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-06 03:01:46 +0100 |
| commit | 8bae93ce181086769175e5c3fb0f0ef66fb9ca89 (patch) | |
| tree | da86b766bd37f1a71d0847fd3ebbd93b1f95ec76 /src/ot_tcp.c | |
| parent | 2cecc9da20afb55613589dafc854e9f4d1a74069 (diff) | |
Stop reading a connection a worker has taken over
Diffstat (limited to 'src/ot_tcp.c')
| -rw-r--r-- | src/ot_tcp.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) { | |||
| 79 | ws->request = cookie->request.data; | 79 | ws->request = cookie->request.data; |
| 80 | ws->request_size = (ssize_t)cookie->request.size; | 80 | ws->request_size = (ssize_t)cookie->request.size; |
| 81 | http_handle_request(sock, ws); | 81 | http_handle_request(sock, ws); |
| 82 | |||
| 83 | /* A worker owns the connection now, and the buffer this loop reads hangs | ||
| 84 | off it, so there is nothing here left to look at */ | ||
| 85 | if (ws->handed_off) | ||
| 86 | return; | ||
| 82 | #ifdef WANT_KEEPALIVE | 87 | #ifdef WANT_KEEPALIVE |
| 83 | if (!ws->keep_alive) | 88 | if (!ws->keep_alive) |
| 84 | #endif | 89 | #endif |
