disable pingOrDie watchdog — false-positives on non-public relays

NDK 2.8.1's outbox model doesn't reliably deliver self-published
events back through subscriptions when the configured relay set is
a single custom (non-public) relay. The pingOrDie self-watchdog
publishes a kind-24133 event to its own pubkey every 20s and exits
the bunker if it doesn't see the echo within 50s — which means on
a private relay channel (e.g. LNbits's nostrrelay extension), the
bunker exits cleanly every 50s even though admin RPCs over that
same channel are working fine.

Plain-WebSocket round-trips to the same relay echo correctly in
<1s, so the issue is on NDK's side, not the relay's.

Commenting out the watchdog is the minimum patch to keep the
daemon alive. Real fix is either an env-flag opt-out, a simpler
connectivity check that doesn't depend on self-echo, or an NDK
upgrade that fixes the outbox-vs-subscribe race.

Fixes #4. See also #7 for the underlying NDK echo investigation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-05-26 00:29:53 +02:00
commit 42dbbd7536

View file

@ -122,7 +122,12 @@ class AdminInterface {
this.rpc.on('request', (req) => this.handleRequest(req));
pingOrDie(this.ndk);
// pingOrDie disabled — NDK 2.8.1 outbox model doesn't echo
// self-published events back through subscriptions on
// non-public relay channels, so the watchdog fires false
// positives and exits the bunker every 50s on private relays.
// See aiolabs/nsecbunkerd#4 + #7.
// pingOrDie(this.ndk);
}).catch((err) => {
console.log('❌ admin connection failed');
console.log(err);