Commit e1d851e1 authored by André Anjos's avatar André Anjos 💬

[async] Check stream before calling stream.closed

parent 56f3247d
Pipeline #970 passed with stage
......@@ -105,7 +105,7 @@ def _read_stream(stream, buf):
'''Reads stream, write on buffer, yields if blocked'''
try:
if not stream.closed:
if (stream is not None) and (not stream.closed):
buf.write(stream.read())
except RuntimeError:
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