Skip to content

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
Contributor

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
Contributor

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
Contributor

@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.

3 participants