From 9595de876df5264846227f6f80a7306df9154278 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 15 Jun 2026 17:00:47 +0000 Subject: ark: skip refresh when ark unconfigured; document LN listener watchdog Guard refreshArkWallet against running when config.ark.arkPrivateKey is unset, and add a comment explaining the ensureListenerAlive watchdog's zombie-socket recovery. Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/lightning.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/lightning.ts') diff --git a/lib/lightning.ts b/lib/lightning.ts index 9e259ed5..2f5f4f00 100644 --- a/lib/lightning.ts +++ b/lib/lightning.ts @@ -127,6 +127,9 @@ export async function listenForLightning() { } } +// Watchdog (run periodically): restart a dead listener, or recycle a zombie one +// that's been blocked in waitanyinvoice far past any normal quiet period while cl +// is actually alive (the dead-listen-socket case). export async function ensureListenerAlive() { if (!listenerActive) { warn("lightning listener: not active, restarting"); -- cgit v1.2.3