Skip to content

fix unreliable rpc tests due to race condition issue on get_available_port#132

Merged
ChrisSon15 merged 2 commits intobisq-network:mainfrom
sdmg15:fix/rpc-tests
Mar 11, 2026
Merged

fix unreliable rpc tests due to race condition issue on get_available_port#132
ChrisSon15 merged 2 commits intobisq-network:mainfrom
sdmg15:fix/rpc-tests

Conversation

@sdmg15
Copy link
Contributor

@sdmg15 sdmg15 commented Mar 10, 2026

fix unreliable rpc tests due to race condition issue on get_available_port.
The function get_available_port is dropping the temporary listener it creates.
It could happen that before the caller bounds to the port another process does.

The solution here is to create the listener ourself and not delegating it to get_available_port anymore and bind to the port before dropping the listener

Copy link
Collaborator

@ChrisSon15 ChrisSon15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@ChrisSon15 ChrisSon15 merged commit f25c0bd into bisq-network:main Mar 11, 2026
3 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.

2 participants