Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disconnection / Connection events ? #115

Open
iangregsondev opened this issue Feb 18, 2020 · 1 comment
Open

Disconnection / Connection events ? #115

iangregsondev opened this issue Feb 18, 2020 · 1 comment

Comments

@iangregsondev
Copy link

Hi,

I was looking at the following code

const {lnd} = lnService.authenticatedLndGrpc({
  cert: 'base64 encoded tls.cert',
  macaroon: 'base64 encoded admin.macaroon',
  socket: '127.0.0.1:10009',
});

I was wondering if there is some kind of disconnection "emit" or similar so i know when LND has gone down - for example.

meaning I am able to re-connect

Or does it work another way ?

The grpc methods would just fail if you called them ?

The active subscription methods would emit an error ?

If there was a connection issue, would we need to re-connect using the above i.e.

const {lnd} = lnService.authenticatedLndGrpc({
cert: 'base64 encoded tls.cert',
macaroon: 'base64 encoded admin.macaroon',
socket: '127.0.0.1:10009',
});

@alexbosworth
Copy link
Owner

If LND goes down, yes the connection will fail with an error and you will need to recreate the connection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants