Skip to content

node: Exit the peer thread promptly on shutdown - #90

Merged
rustaceanrob merged 1 commit into
kernel-node:masterfrom
pzafonte:node-shutdown-peer-thread
Jul 29, 2026
Merged

node: Exit the peer thread promptly on shutdown#90
rustaceanrob merged 1 commit into
kernel-node:masterfrom
pzafonte:node-shutdown-peer-thread

Conversation

@pzafonte

Copy link
Copy Markdown
Contributor

A reconnect racing shutdown blocks on a new connection until the 60s p2p timeout. Set running to false before closing the peer connection, and re-check it after connecting. Also give the addr thread a receive timeout so it stops on the flag.

Closes #89

A reconnect racing shutdown blocks on a new connection until the 60s
p2p timeout. Set running to false before closing the peer connection,
and re-check it after connecting.

Also give the addr thread a receive timeout so it stops on the flag.
@rustaceanrob

Copy link
Copy Markdown
Contributor

Looks good, thought all threads followed this pattern but good catch.

@rustaceanrob
rustaceanrob merged commit 3b3d671 into kernel-node:master Jul 29, 2026
2 checks passed
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.

Node hangs on shutdown when a peer connects after stop is signalled

2 participants