aboutsummaryrefslogtreecommitdiffstats
path: root/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.ts b/index.ts
index a664638d..98a9668e 100644
--- a/index.ts
+++ b/index.ts
@@ -5,7 +5,7 @@ import { admin, auth, optional } from "$lib/auth";
import { getDelegateInfo, receiveDelegation } from "$lib/delegator";
import { g, s } from "$lib/db";
-import { fixBolt12, listenForLightning, replay } from "$lib/lightning";
+import { ensureListenerAlive, fixBolt12, listenForLightning, replay } from "$lib/lightning";
import { l } from "$lib/logging";
import { startHealthCheck } from "$lib/health";
import { getLocations } from "$lib/locations";
@@ -49,6 +49,7 @@ setTimeout(listenForLightning, 2000);
listenForDMs();
initMlsIndex();
setInterval(sendHeartbeat, 2000);
+setInterval(ensureListenerAlive, 120_000); // LN listener watchdog
app.get("/balances", info.balances);
app.get("/health", info.health);