-
Notifications
You must be signed in to change notification settings - Fork 59
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
base: master
Are you sure you want to change the base?
Conversation
aperture.go
Outdated
// shutting the proxy down we will just log the error. | ||
lncErrChan := make(chan error) | ||
go func() { | ||
for { |
There was a problem hiding this comment.
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
25efe67
to
edea59e
Compare
@positiveblue, remember to re-request review from reviewers when ready |
Closing due to inactivity |
7 similar comments
Closing due to inactivity |
Closing due to inactivity |
Closing due to inactivity |
Closing due to inactivity |
Closing due to inactivity |
Closing due to inactivity |
Closing due to inactivity |
!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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
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.