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: Remove instead of disconnect node #1644

Merged
merged 1 commit into from Mar 8, 2019

Conversation

matheusd
Copy link
Member

@matheusd matheusd commented Mar 6, 2019

This changes the behavior of peer disconnection logic, such that
permanent peers are actually removed from the connection manager when
requested, instead of just being disconnected and therefore triggering a
future retry.

Previously, this prevented the addnode [addr] remove from correctly
removing permanent peers. A connection retry attempt would always be
performed.

The easiest way to test this behavior is to run two nodes disconnected from any other public nodes (either in testnet or on a private simnet), connect them via dcrctl addnode [othernode] add then disconnect via dcrctl addnode [othernode] remove. Without this patch the nodes will reconnect, even though the previous remove command should have removed the peer from the permanent list.

This changes the behavior of peer disconnection logic, such that
permanent peers are actually removed from the connection manager when
requested, instead of just being disconnected and therefore triggering a
future retry.

Previously, this prevented the addnode [addr] remove from correctly
removing permanent peers. A connection retry attempt would always be
performed.
@davecgh davecgh merged commit 6628e8d into decred:master Mar 8, 2019
@davecgh davecgh added this to the 1.5.0 milestone Mar 8, 2019
@matheusd matheusd deleted the server-removenode-bug branch November 25, 2020 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants