Commit 5c752d98 authored by Denis Bilenko's avatar Denis Bilenko

gevent.select: check what was received via switch()

parent d345c1a0
......@@ -39,6 +39,9 @@ def select(read_list, write_list, error_list, t=None):
return hub.switch()
except gevent.TimeoutError:
return [], [], []
if hasattr(result, '__len__') and len(result)==3:
return result
raise RuntimeError("Invalid switch into select: %r" % (result, ))
finally:
for evt in allevents:
evt.cancel()
......
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