Commit 6fe93cde authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

For readable() objects, the previous value of 'flags' was ignored.

Rearrange code for writable() case to make the parallel logic clearer
parent ad6ce46f
......@@ -138,9 +138,9 @@ def poll2(timeout=0.0, map=None):
for fd, obj in map.items():
flags = select.POLLERR | select.POLLHUP | select.POLLNVAL
if obj.readable():
flags = select.POLLIN | select.POLLPRI
flags |= select.POLLIN | select.POLLPRI
if obj.writable():
flags = flags | select.POLLOUT
flags |= select.POLLOUT
if flags:
pollster.register(fd, flags)
try:
......
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