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

Conversation

Projects
None yet
6 participants
@icota
Copy link
Contributor

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.

Show resolved Hide resolved config.go

@icota icota force-pushed the icota:max-backoff-config branch from ec2950f to 2cd405b Oct 5, 2018

@wpaulino
Copy link
Collaborator

wpaulino left a comment

LGTM ⚡️

@Roasbeef Roasbeef added this to the 0.6 milestone Oct 8, 2018

@Roasbeef

This comment has been minimized.

Copy link
Member

Roasbeef commented Dec 4, 2018

Needs a rebase!

@icota icota force-pushed the icota:max-backoff-config branch from 2cd405b to e0f0990 Dec 4, 2018

@icota

This comment has been minimized.

Copy link
Contributor Author

icota commented Dec 4, 2018

Rebased.

Show resolved Hide resolved server.go Outdated
@wpaulino

This comment has been minimized.

Copy link
Collaborator

wpaulino commented Dec 6, 2018

Could you squash the commits into one as well?

@icota icota force-pushed the icota:max-backoff-config branch from 3c84080 to 02442ec Dec 6, 2018

@cfromknecht
Copy link
Collaborator

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

@Roasbeef
Copy link
Member

Roasbeef left a comment

LGTM 🛎

@Roasbeef Roasbeef merged commit 5451211 into lightningnetwork:master Dec 7, 2018

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
You can’t perform that action at this time.