sphinx-doc / sphinx-autobuild

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a hot-reload web server.
MIT License
551 stars 83 forks source link

Server not yet serving when browser is opened for the first time #179

Open cmarqu opened 2 months ago

cmarqu commented 2 months ago

When I start sphinx-autobuild with the --open-browser option, it opens the browser after the Sphinx build is done, but the server hasn't started yet, so the browser shows a 404. I can then immediately reload the page which now successfully renders.

Things work as expected when I remove the t.join() line here: https://github.com/sphinx-doc/sphinx-autobuild/blob/7d199ed578825a33214741d30d397ae01a6ada4c/sphinx_autobuild/utils.py#L30

AA-Turner commented 1 month ago

The browser should open after a 5 second delay (adjusted via --delay XXX). Does this delay not occur?

A

cmarqu commented 1 month ago

The browser is opening only after the delay, but the server is not starting during that time in the background, but only after the waiting time (I also set it to much longer, the behavior doesn't change).