diff options
| author | Adam Soltys <[email protected]> | 2026-06-08 22:49:26 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-08 22:49:26 +0000 |
| commit | 7c34b4312c8aafc7643a5192d54daea14cfc1559 (patch) | |
| tree | a50cb8c940d04e15d2a6b90304e58b927ed88ae6 /scripts | |
| parent | 40d6c63cac3b59b9118abeb3b8571d0348ccfbfe (diff) | |
| download | coinos-server-7c34b4312c8aafc7643a5192d54daea14cfc1559.tar.gz coinos-server-7c34b4312c8aafc7643a5192d54daea14cfc1559.zip | |
ln/lightning: watchdog recycles zombie receive-listener socket
Port of master bd1ece3 to staging. When cl restarts (e.g. autoheal after a
healthcheck timeout), the app's waitanyinvoice long-poll can hang on the now-dead
listen socket: listenerActive stays true forever, nothing restarts it, and
incoming lightning payments silently stop crediting until a manual app restart.
The per-call RPC timeout can't catch this — waitanyinvoice is meant to block.
ensureListenerAlive (run every 120s) now also detects a stalled listener — active
but blocked in waitanyinvoice for >5min — probes cl via the main socket (getinfo),
and only if cl is actually alive treats the listen socket as a zombie: bumps a
listenerEpoch, calls lnListen.reset() (new: drops the proxy socket so the next
call reconnects), and re-arms. The epoch guard makes the wedged invocation bow out
when its waitanyinvoice finally rejects, so we never run two listeners or
double-credit.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
