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

refactor wait until process signals instead pf sleep #2099

Merged
merged 4 commits into from
Nov 24, 2023

Conversation

nilupulmanodya
Copy link
Collaborator

fixes #2074

@matrss
Copy link
Collaborator

matrss commented Nov 16, 2023

Thanks for the PR! I think this is a bit more complicated than it needs to be though.

What I had in mind initially was to check stdout of the mscolab process for something that tells us that it is ready to accept connections. Unfortunately, it does not do that (the last thing it prints is "INFO: Launching MSColab Server", but that is from before it actually has set up its listening stuff so it does not tell us that it is ready to receive a connection).

Retrying is the next best thing, as you have implemented. curl includes an option for that though (curl --retry 5 --retry-connrefused, possibly varying --retry-delay as well). I think it would be better to just use that instead of implementing the retry logic again.

@nilupulmanodya
Copy link
Collaborator Author

Thanks for the PR! I think this is a bit more complicated than it needs to be though.

What I had in mind initially was to check stdout of the mscolab process for something that tells us that it is ready to accept connections. Unfortunately, it does not do that (the last thing it prints is "INFO: Launching MSColab Server", but that is from before it actually has set up its listening stuff so it does not tell us that it is ready to receive a connection).

Retrying is the next best thing, as you have implemented. curl includes an option for that though (curl --retry 5 --retry-connrefused, possibly varying --retry-delay as well). I think it would be better to just use that instead of implementing the retry logic again.

Thanks :)

@ReimarBauer ReimarBauer merged commit fc2f3c6 into Open-MSS:develop Nov 24, 2023
4 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.

Do not use sleep as a synchronization primitive
3 participants