Commit acf3371a authored by André Anjos's avatar André Anjos 💬
Browse files

[async] Use a solution with readline() instead of read()

parent e1d851e1
Pipeline #971 passed with stage
......@@ -105,9 +105,12 @@ def _read_stream(stream, buf):
'''Reads stream, write on buffer, yields if blocked'''
try:
if (stream is not None) and (not stream.closed):
buf.write(stream.read())
while not stream.closed:
l = stream.readline()
if not l: break
buf.write(l)
except RuntimeError:
# process was terminated abruptly
pass
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment