Crafter.Network/implementations
Repository files (latest commit first)
Filename Latest commit message Latest commit date
catbot ea1310faec fix(http1): close a finished connection instead of holding it until reap
A connection's socket was owned by the registry entry and only released
when the next accept() reaped it, so a peer we had finished with — after
a 408, a 400, or a `connection: close` — never saw EOF and sat waiting
for a server that was done talking. On a server that goes quiet it also
held every descriptor from the last burst indefinitely.

The connection thread now closes its own socket the moment Serve()
returns, under the registry lock so Stop()'s shutdown() can never name a
descriptor that has already been released, and Stop() waits on a
condition variable for the last thread rather than assuming the vector
it moved out is quiescent. Adopt() is also fully guarded: it runs on
ListenerTCP's accept loop, which has no handler, so anything escaping it
would abort the process.

Found by ShouldSurviveAbuseHTTP1, added here: 24 concurrent keep-alive
clients, peers that vanish mid-request or send garbage, and a peer that
stalls forever — the server must keep serving and still stop promptly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-27 00:56:53 +00:00
..
Crafter.Network-ClientHTTP-Browser.cpp SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ClientHTTP.cpp SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ClientHTTP1.cpp feat(http1): add an HTTP/1.1 client and listener 2026-07-27 00:45:09 +00:00
Crafter.Network-ClientQUIC-Browser.cpp SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ClientQUIC.cpp SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ClientTCP.cpp fix(tcp): resolve, connect, bind and send failures were silent or wrong 2026-07-27 00:44:56 +00:00
Crafter.Network-ListenerHTTP.cpp SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ListenerHTTP1.cpp fix(http1): close a finished connection instead of holding it until reap 2026-07-27 00:56:53 +00:00
Crafter.Network-ListenerQUIC.cpp SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ListenerTCP.cpp fix(tcp): resolve, connect, bind and send failures were silent or wrong 2026-07-27 00:44:56 +00:00
Crafter.Network-WebTransport.cpp SPDX license 2026-07-22 17:55:45 +02:00