__                 _ _                _
  / _| ___   ___   __| | |__   __ _ _ __| | __
 | |_ / _ \ / _ \ / _` | '_ \ / _` | '__| |/ /
 |  _| (_) | (_) | (_| | |_) | (_| | |  |   <
 |_|  \___/ \___/ \__,_|_.__/ \__,_|_|  |_|\_\

A personal BBS  ·  Missoula, Montana  ·  formerly NaClCON BBS

Connect from your terminal: telnet naclconbbs.net 23  |  ssh naclconbbs.net -p 2222

  • exec/tests/ircd/sendq.jsexec/load/ircd/core.js user.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Oct 17 16:03:40 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/a10960ca6dedc1a0a89226ae
    Added Files:
    exec/tests/ircd/sendq.js
    Modified Files:
    exec/load/ircd/core.js user.js
    Log Message:
    ircd: stop retrying the send queue of a closed connection forever

    Queue_Send() re-arms itself on a 100 ms timer while a socket won't accept
    more data. User_Quit() closed a local user's socket without purging its
    send queue, and Socket.send() on a closed socket fails without throwing, so
    the drain kept re-arming: every user who disconnected with output still
    queued (typically a ping timeout on a client that had stopped reading) left
    a 10 Hz timer running for the life of the process.

    Those orphans accumulate. On cvs they reached about 70 timers (about 825
    events per second) within a day, and after 5.5 days the callback engine was pinned at 100% of a core, could no longer answer PINGs in time, and every linked server dropped it.

    Queue_Send() now purges and returns when the socket is no longer connected, which covers every path that closes a connection with output pending, and User_Quit() purges the local user's queues as the server quit path already
    did.

    exec/tests/ircd/sendq.js covers the 100 ms back-off on a stalled socket, the immediate continuation of a partial send, and dropping (not retrying)
    output left on or queued to a closed socket.

    Fixes #1289

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net