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

LNC gets stuck in an infinite loop if it cannot connect #83

Open
rolznz opened this issue Jun 13, 2023 · 2 comments
Open

LNC gets stuck in an infinite loop if it cannot connect #83

rolznz opened this issue Jun 13, 2023 · 2 comments

Comments

@rolznz
Copy link

rolznz commented Jun 13, 2023

Hi, Alby allows users to connect to their node through an LNC connector

However, we have some cases where the lightning terminal is not running or not reachable, therefore the connection can never succeed, and we are unable to stop lnc from running even after lnc.disconnect();

Ideally if lnc.disconnect is called() LNC should not repeatedly try to re-connect (especially if it couldn't connect in the first place)

If connect() fails (or lnc.isConnected() returns false), should we still call disconnect()?

This set of logs gets repeated endlessly:

index.js:2 2023-06-13 19:47:07.451 [DBG] MBOX: Client: receive mailbox initialized
index.js:2 2023-06-13 19:47:07.783 [DBG] MBOX: Client: got failure on receive socket/stream, re-trying: {"code":2,"message":"stream not found","details":[]}
index.js:2 2023-06-13 19:47:08.815 [DBG] MBOX: Client: Attempting to create send socket/stream
index.js:2 2023-06-13 19:47:09.660 [DBG] MBOX: Client: Connected to send socket/stream
index.js:2 2023-06-13 19:47:10.739 [DBG] MBOX: Client: receive mailbox initialized
index.js:2 2023-06-13 19:47:11.065 [DBG] MBOX: Client: got failure on receive socket/stream, re-trying: {"code":2,"message":"stream not found","details":[]}
index.js:2 2023-06-13 19:47:13.687 [DBG] MBOX: Client: got failure on send socket/stream, re-trying: failed to write: WebSocket closed: unclean connection close: status = StatusAbnormalClosure and reason = ""
@levmi
Copy link

levmi commented Jun 13, 2023

Hi, thanks so much for the report and feedback! We'll have someone take a look into this over the next sprint cycle or so (couple of weeks). We'll respond here as we find the issue and make any necessary fixes :)

@lnbc1QWFyb24
Copy link

I am also running in to this issue. If the user inputs an already used pairing phrase (or anything that would cause the connection to fail), even after calling disconnect, LNC continues to keep trying to connect on a loop even if a new connection has been made that is successful.

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

3 participants