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

Race Condition when getting Ports for instances in TorPool #13

Closed
jogli5er opened this issue Nov 21, 2019 · 1 comment
Closed

Race Condition when getting Ports for instances in TorPool #13

jogli5er opened this issue Nov 21, 2019 · 1 comment

Comments

@jogli5er
Copy link
Contributor

jogli5er commented Nov 21, 2019

When populating TorPool with a larger number of TorProcesses, a race condition appears when getting the ports. This is a known problem of the get-port package (Compare sindresorhus/get-port#23), but as there is no better solution so far I suggest that we shift getting the default ports outside of the TorProcess into the creation function of the TorPool and protect the execution of the getPort function, such that no race conditions should appear.
A suggested fix can be found in pull request #14

@jogli5er
Copy link
Contributor Author

As the pull request was merged, I'll close the issue

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

No branches or pull requests

1 participant