Initial LND socket has no args, handle

This commit is contained in:
Daniel Lugo 2021-07-25 17:07:07 -04:00
parent c795009e94
commit 6354962b2f

View file

@ -57,7 +57,16 @@ module.exports = (
const { services } = LightningServices 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) const args = JSON.parse(unParsed)
@ -100,6 +109,7 @@ module.exports = (
call.write(args) call.write(args)
}) })
} catch (err) { } catch (err) {
logger.error(err)
logger.error('LNDRPC: ' + err.message) logger.error('LNDRPC: ' + err.message)
} }
}) })