multi: allow LNC reconnects without restarting the proxy#107
Open
positiveblue wants to merge 1 commit intolightninglabs:masterfrom
Open
multi: allow LNC reconnects without restarting the proxy#107positiveblue wants to merge 1 commit intolightninglabs:masterfrom
positiveblue wants to merge 1 commit intolightninglabs:masterfrom
Conversation
guggero
reviewed
Jul 11, 2023
| // shutting the proxy down we will just log the error. | ||
| lncErrChan := make(chan error) | ||
| go func() { | ||
| for { |
Contributor
There was a problem hiding this comment.
This will never quit, causing the goroutine to run forever.
Could just do a range over the channel itself, see https://gobyexample.com/range-over-channels
25efe67 to
edea59e
Compare
Collaborator
|
@positiveblue, remember to re-request review from reviewers when ready |
Collaborator
|
Closing due to inactivity |
7 similar comments
Collaborator
|
Closing due to inactivity |
Collaborator
|
Closing due to inactivity |
Collaborator
|
Closing due to inactivity |
Collaborator
|
Closing due to inactivity |
Collaborator
|
Closing due to inactivity |
Collaborator
|
Closing due to inactivity |
Collaborator
|
Closing due to inactivity |
Contributor
|
!lightninglabs-deploy mute |
LNC will automatically try to reconnect to the LND node whenever there is an error. Until now, losing the connection with the LND node made the proxy shut down. When using LNC, we can simply log that we received an error and let the library handle the reconnection. Because we do not want to overheat the server when the backend lnd node is down, we need to make sure that we add a timeout to the client calls.
edea59e to
20c1315
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LNC will automatically try to reconnect to the LND node whenever there is an error.
Until now, losing the connection with the LND node made the proxy shut down. When using LNC, we can simply log that we received an error and let the library handle the reconnection.
Because we do not want to overheat the server when the backend lnd node is down, we need to make sure that we add a timeout to the client calls.