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

start_dashboard hangs if there aren't two available ports in the provided range #112

Closed
harmenwassenaar opened this issue Jan 2, 2024 · 1 comment · Fixed by #116
Closed
Assignees
Labels
bug Something isn't working

Comments

@harmenwassenaar
Copy link
Collaborator

The main process simply keeps waiting for DASHBOARD_STARTED_EVENT to be set, which never happens when the "all ports used" exception occurs in the child process.

@sybrenjansen
Copy link
Owner

Ah yes, I see. Seems you can easily fix it by altering the start_dashboard function to something like this:

while not DASHBOARD_STARTED_EVENT.wait(timeout=0.01):
    if process.join(timeout=0.01):
        raise ....

If the process joins, then apparantly an exception occurred.

Perhaps storing the exception of the _run function and raising that is better, but it requires more work.

@sybrenjansen sybrenjansen self-assigned this Jan 8, 2024
@sybrenjansen sybrenjansen added the bug Something isn't working label Jan 8, 2024
sybrenjansen added a commit that referenced this issue Jan 8, 2024
)

* Fixed start_dashboard freeze when there are no two ports available. Fixes #112

---------

Co-authored-by: sybrenjansen <sybren.jansen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants