diff --git a/mitogen/master.py b/mitogen/master.py index 5aef0ec9..c3a52788 100644 --- a/mitogen/master.py +++ b/mitogen/master.py @@ -174,7 +174,8 @@ def iter_read(fd, deadline=None): continue s, disconnected = mitogen.core.io_op(os.read, fd, 4096) - if disconnected: + IOLOG.debug('iter_read(%r) -> %r', fd, s) + if disconnected or not s: raise mitogen.core.StreamError( 'EOF on stream; last 300 bytes received: %r' % (''.join(bits)[-300:],)