Commits

Stefano Rivera committed 693f483

Retry if non-blocking-read returns EAGAIN

Comments (0)

Files changed (1)

test/test_utils/async_sub.py

                 if not select.select([conn], [], [], 0)[0]:
                     return ''
                 
-                r = conn.read(maxsize)
+                try:
+                    r = conn.read(maxsize)
+                except IOError, e:
+                    if e.errno == errno.EAGAIN:
+                        return ''
+                    raise
                 if not r:
                     return self._close(which)