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
wpaulino
wpaulino previously approved these changes Oct 6, 2018
Copy link
Collaborator

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

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

LGTM ⚡️

@Roasbeef Roasbeef added this to the 0.6 milestone Oct 8, 2018
@halseth halseth added config Parameters/arguments/config file related issues/PRs P3 might get fixed, nice to have needs testing PR hasn't yet been actively tested on testnet/mainnet labels Oct 11, 2018
@Roasbeef
Copy link
Member

Roasbeef commented Dec 4, 2018

Needs a rebase!

@icota
Copy link
Contributor Author

icota commented Dec 4, 2018

Rebased.

wpaulino
wpaulino previously approved these changes Dec 6, 2018
server.go Outdated Show resolved Hide resolved
@wpaulino
Copy link
Collaborator

wpaulino commented Dec 6, 2018

Could you squash the commits into one as well?

Copy link
Contributor

@cfromknecht cfromknecht left a comment

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

LGTM 🛎

@Roasbeef Roasbeef merged commit 5451211 into lightningnetwork:master Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Parameters/arguments/config file related issues/PRs needs testing PR hasn't yet been actively tested on testnet/mainnet P3 might get fixed, nice to have
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants