From 6354962b2f3eb177659c80ff647ca5a0cfba4ebf Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Sun, 25 Jul 2021 17:07:07 -0400 Subject: [PATCH] Initial LND socket has no args, handle --- src/sockets.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/sockets.js b/src/sockets.js index 281b3eec..6f19d9a2 100644 --- a/src/sockets.js +++ b/src/sockets.js @@ -57,7 +57,16 @@ module.exports = ( const { services } = LightningServices - const { service, method, args: unParsed } = socket.handshake.auth + const { + service, + method, + args: unParsed, + isInitial + } = socket.handshake.auth + + if (isInitial) { + return + } const args = JSON.parse(unParsed) @@ -100,6 +109,7 @@ module.exports = ( call.write(args) }) } catch (err) { + logger.error(err) logger.error('LNDRPC: ' + err.message) } })