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

fix(p2p): fix stall timer checks #2015

Merged
merged 1 commit into from
Dec 3, 2020
Merged

fix(p2p): fix stall timer checks #2015

merged 1 commit into from
Dec 3, 2020

Conversation

sangaman
Copy link
Collaborator

@sangaman sangaman commented Dec 3, 2020

This fixes a regression introduced in #1994 that prevents enabling the stall timer for peers that checks whether peers are not responding to our packets in a reasonable timeframe and disconnecting those that are not. Without these checks, peers that have gone offline may remain in the list of connected peers, resulting in unexpected behavior and also preventing those peers from establishing new connections with us once they come back online.

Closes #2010.

I'm also hoping, but can't say for sure, that this fixes the test flakiness case that arose recently described here #1771 (comment).

This fixes a regression introduced in #1994 that prevents enabling the
stall timer for peers that checks whether peers are not responding to
our packets in a reasonable timeframe and disconnecting those that are
not. Without these checks, peers that have gone offline may remain in
the list of connected peers, resulting in unexpected behavior and also
preventing those peers from establishing new connections with us once
they come back online.

Closes #2010.
@sangaman sangaman added bug Something isn't working p2p Peer to peer networking labels Dec 3, 2020
@sangaman sangaman self-assigned this Dec 3, 2020
@raladev raladev merged commit 405f50e into master Dec 3, 2020
@erkarl erkarl deleted the fix/init-stall branch December 3, 2020 17:29
@LePremierHomme
Copy link
Contributor

Sorry, my bad!

@sangaman
Copy link
Collaborator Author

sangaman commented Dec 4, 2020

Sorry, my bad!

It happens! I overlooked it too when reviewing. I'm thinking a bit about a good regression test to add in to prevent such a regression in the future, it's a bit awkward because we'd need to wait 5-10 seconds for the stall timer to kick in which is a bit long of a delay for the test, but maybe I can reduce the delay without messing with any of the key functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p2p Peer to peer networking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Peer connection test cases
4 participants