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

multi: allow LNC reconnects without restarting the proxy #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

positiveblue
Copy link
Contributor

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.

aperture.go Outdated
// shutting the proxy down we will just log the error.
lncErrChan := make(chan error)
go func() {
for {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@positiveblue positiveblue force-pushed the lnc-reconnect branch 3 times, most recently from 25efe67 to edea59e Compare October 19, 2023 23:33
@lightninglabs-deploy
Copy link
Collaborator

@positiveblue, remember to re-request review from reviewers when ready

@lightninglabs-deploy
Copy link
Collaborator

Closing due to inactivity

7 similar comments
@lightninglabs-deploy
Copy link
Collaborator

Closing due to inactivity

@lightninglabs-deploy
Copy link
Collaborator

Closing due to inactivity

@lightninglabs-deploy
Copy link
Collaborator

Closing due to inactivity

@lightninglabs-deploy
Copy link
Collaborator

Closing due to inactivity

@lightninglabs-deploy
Copy link
Collaborator

Closing due to inactivity

@lightninglabs-deploy
Copy link
Collaborator

Closing due to inactivity

@lightninglabs-deploy
Copy link
Collaborator

Closing due to inactivity

@guggero
Copy link
Member

guggero commented Jan 8, 2024

!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.
Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

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

Successfully merging this pull request may close these issues.

None yet

3 participants