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

eth: unregister peer only when handler exits #22908

Merged
merged 3 commits into from
May 25, 2021

Conversation

fjl
Copy link
Contributor

@fjl fjl commented May 19, 2021

This fixes the error log message:

ERROR[05-19|15:21:29.382] Ethereum peer removal failed             peer=b43a87c5 err="peer not registered"

The error happened because removePeer was called multiple times: once to disconnect the peer, and another time when the handler exited.

With this change, removePeer now has the sole purpose of disconnecting the peer. Unregistering happens exactly once, when the handler exits.

@fjl fjl added this to the 1.10.4 milestone May 25, 2021
@fjl fjl merged commit 836c647 into ethereum:master May 25, 2021
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
This removes the error log message that says 

    Ethereum peer removal failed ... err="peer not registered"

The error happened because removePeer was called multiple
times: once to disconnect the peer, and another time when the
handler exited. With this change, removePeer now has the sole
purpose of disconnecting the peer. Unregistering happens exactly
once, when the handler exits.
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.

2 participants