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

bugfix: gracefull shutdown #13

Merged
merged 2 commits into from
Apr 11, 2022
Merged

bugfix: gracefull shutdown #13

merged 2 commits into from
Apr 11, 2022

Conversation

yasyzb
Copy link

@yasyzb yasyzb commented Apr 11, 2022

Description

delete(ps.diffWait, id) while the handshake fails on handler_diff.go

Rationale

The preceding error occurs multiple times when node stop(). Wait channel in waitDiffExtension can't exit normally.

In runEthPeer of eth/handler.go, if the peer has a diff extension, wait for it to connect through peerset.diffWait channel.
While RunPeer of eth/handler_diff.go runs, if the peer.Handshake is successful, peerset.diffWait[id] will exit and be removed. If it it not successful, peerset.diffWait[id] on waitDiffExtension will keep waiting. Which caused graceful shutdown cannot be enabled

@yasyzb yasyzb changed the base branch from main to develop April 11, 2022 04:56
@yasyzb yasyzb merged commit 1fe5dc4 into develop Apr 11, 2022
@yasyzb yasyzb deleted the bugfix/gracefull-shutdown branch April 11, 2022 04:58
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.

1 participant