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

Server: make maximum backoff configurable #2007

Merged
merged 1 commit into from Dec 7, 2018
Merged

Server: make maximum backoff configurable #2007

merged 1 commit into from Dec 7, 2018

Conversation

@icota
Copy link
Contributor

@icota icota commented Oct 4, 2018

In case of spotty wifi coverage a mobile device will rapidly switch from wifi to 4G and vice versa. In these cases the persistent peer will disconnect and the backoff period will increase exponentially. After a couple reconnects we are talking about minutes which makes for bad user experience.

config.go Show resolved Hide resolved
Copy link
Collaborator

@wpaulino wpaulino left a comment

LGTM ⚡️

@Roasbeef
Copy link
Member

@Roasbeef Roasbeef commented Dec 4, 2018

Needs a rebase!

@icota
Copy link
Contributor Author

@icota icota commented Dec 4, 2018

Rebased.

server.go Outdated Show resolved Hide resolved
@wpaulino
Copy link
Collaborator

@wpaulino wpaulino commented Dec 6, 2018

Could you squash the commits into one as well?

Copy link
Collaborator

@cfromknecht cfromknecht left a comment

LGTM!

Another thing that would help wrt to mobile is to have a configurable defaultStableConnDuration. This parameter specifies that if a connection lasts shorter than this duration, we will always try to back it off. The current value is 10 minutes, which might be too long on mobile. That would also make a good candidate for a follow up if you're interested :)

https://github.com/lightningnetwork/lnd/blob/master/server.go#L63

Copy link
Member

@Roasbeef Roasbeef left a comment

LGTM 🛎

@Roasbeef Roasbeef merged commit 5451211 into lightningnetwork:master Dec 7, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants