https://gitlab.synchro.net/main/sbbs/-/commit/cfa6fe9e126476a9f3db8384
Modified Files:
src/sbbs3/services.cpp
Log Message:
services: don't apply JS disconnection check to static services
ead5ccf16 (song-11-earn) added a disconnection check to the Services
server's js_OperationCallback() that aborts a script once its client
socket has been gone for 10 consecutive callbacks (socket_check() of client->socket fails). This is correct for per-connection services
(accepted client socket), but static services (SERVICE_OPT_STATIC -
e.g. the IRC daemon, MRC connector) run via js_static_service_thread()
with a zero-initialized service_client whose .socket is never set (0). socket_check(0, ...) returns false, so auto_terminate static services
were wrongly warned "Disconnected" and aborted after 10 callbacks, then
(being STATIC_LOOP) immediately restarted - cycling endlessly.
Gate the disconnection check on !(client->service->options & SERVICE_OPT_STATIC) so it only runs for real per-client connections.
Fixes #1156 (reported by Accession).
Co-Authored-By: Claude Opus 4.8 <
[email protected]>
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)