-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(libtor): prevent metrics port conflict (#6125)
Description --- Prevent conflict with metrics port when starting multiple nodes using libtor Run tor in background without an unnecessary task spawn Write the control port to a file (not used in the node implementation) Support for tor auto assigning it's own ports Motivation and Context --- Set metrics port to 0 (os -assigned) so that multiple libtor instances do not conflict Previously we'd wait on a shutdown signal in an async function, but tor runs in the background in an OS thread and waiting on a shutdown does nothing other than keep a task open in memory. We could experience issues binding and dropping a listener quickly on some platforms. It would be better for tor to assign its own port however we could implement that if this is ever an issue, until then this code just makes us aware of that option. How Has This Been Tested? --- Running two base nodes and a wallet with libtor enabled on each What process can a PR reviewer use to test or verify this change? --- <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain -->
- Loading branch information
Showing
5 changed files
with
28 additions
and
22 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters