diff --git a/app/lib/lnd/lightning.js b/app/lib/lnd/lightning.js index 288ad9f1..7cdc0070 100644 --- a/app/lib/lnd/lightning.js +++ b/app/lib/lnd/lightning.js @@ -93,8 +93,9 @@ class Lightning { // Wait for the gRPC connection to be established. return new Promise((resolve, reject) => { - grpc.waitForClientReady(this.service, getDeadline(2), err => { + this.service.waitForReady(getDeadline(2), err => { if (err) { + this.service.close() return reject(err) } return resolve() diff --git a/app/lib/lnd/walletUnlocker.js b/app/lib/lnd/walletUnlocker.js index 318a2450..b712424c 100644 --- a/app/lib/lnd/walletUnlocker.js +++ b/app/lib/lnd/walletUnlocker.js @@ -74,8 +74,9 @@ class WalletUnlocker { // Wait for the gRPC connection to be established. return new Promise((resolve, reject) => { - grpc.waitForClientReady(this.service, getDeadline(2), err => { + this.service.waitForReady(getDeadline(2), err => { if (err) { + this.service.close() return reject(err) } return resolve()