Skip to content
Snippets Groups Projects
Commit f33b6f8a authored by khatskevich's avatar khatskevich Committed by Roman Tsisyk
Browse files

http: fix deadlock in the test case

There was a real chance that httpd.py got stuck blocked on stdio.write
due to the buffer overflow. The very frequent heartbeat was set to flush
the buffer faster. This commit decreases heartbeat frequency but makes
stdio flush manually.
parent 509e7504
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,8 @@ def heartbeat():
try:
while True:
sys.stdout.write("heartbeat\n")
sleep(1e-3)
sys.stdout.flush()
sleep(1e-1)
except IOError:
sys.exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment