https://gitlab.synchro.net/main/sbbs/-/commit/6b8902bab7a555c145012dbc
Modified Files:
src/sbbs3/websrvr.cpp
Log Message:
Web Server: don't let lingering client sockets stall termination
close_socket() half-closes the socket and then waits for the peer to
close its side, for up to max_inactivity seconds in a single blocking
call that ignored terminate_server. Clients that never close (abandoned
scraper connections, typically) held each session thread there for up to
a minute after its inactivity timeout. By then close_session_socket() had already removed the session from current_connections, so
shutdown_sessions() could not reach it, and a server stop or recycle
waited on these threads for minutes.
Poll in one-second slices and stop waiting once terminate_server is set.
The normal-operation bound is unchanged. This also applies to sockets
the listener thread rejects (rate-limited, ip-silent.can, max clients),
which go through the same function.
Also, after "!TIMEOUT waiting for N active clients to disconnect", no
longer follow it with "Done waiting for active clients to disconnect".
Co-Authored-By: Claude Opus 5.5 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net