Skip to content

connmgr: fix race between disconnect callback and state update#370

Open
kcalvinalvin wants to merge 1 commit into
utreexo:mainfrom
kcalvinalvin:2026-03-04-fix-connmgr-test
Open

connmgr: fix race between disconnect callback and state update#370
kcalvinalvin wants to merge 1 commit into
utreexo:mainfrom
kcalvinalvin:2026-03-04-fix-connmgr-test

Conversation

@kcalvinalvin
Copy link
Copy Markdown
Contributor

Move the connection state update (ConnDisconnected/ConnPending) before launching the OnDisconnection callback goroutine. Previously the callback could fire and be observed before the state was set, causing intermittent test failures in TestRetryPermanent.

Move the connection state update (ConnDisconnected/ConnPending) before
launching the OnDisconnection callback goroutine. Previously the
callback could fire and be observed before the state was set, causing
intermittent test failures in TestRetryPermanent.
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