Skip to content

Commit

Permalink
Flush output to notify without blocking in http-disk-server callers
Browse files Browse the repository at this point in the history
Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.tech>
  • Loading branch information
Wescoeur committed Nov 15, 2024
1 parent 5549312 commit 4a4ec43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions http_disk_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ def emit_server_ready():
if STARTING_SERVER:
eprint('Server ready!')
STARTING_SERVER = False
# Flush to ensure we can read notification message
# in another process without waiting.
sys.stdout.flush()
sys.stderr.flush()

httpd = None
httpd_thread = None
Expand Down

0 comments on commit 4a4ec43

Please sign in to comment.