Skip to content

eth: unregister peer only when handler exits#22908

Merged
fjl merged 3 commits intoethereum:masterfrom
fjl:eth-removepeer-cleanup
May 25, 2021
Merged

eth: unregister peer only when handler exits#22908
fjl merged 3 commits intoethereum:masterfrom
fjl:eth-removepeer-cleanup

Conversation

@fjl
Copy link
Copy Markdown
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