From bbd41a697d2c76c71dbbca088230c697acf6997d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Wed, 12 Jun 2024 17:08:24 +0200 Subject: [PATCH] Fix function context for scheduled reauth --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a8bc84f..b286cf0 100644 --- a/index.js +++ b/index.js @@ -121,7 +121,7 @@ function connectLndhub () { if (connected) { console.log("Connected to Lndhub"); // automatically refresh auth token once a day - setInterval(lndhub.reauth, 86400000); + setInterval(() => lndhub.reauth(), 86400000); } else { process.exit(1); }