For readable() objects, the previous value of 'flags' was ignored.
Rearrange code for writable() case to make the parallel logic clearer
This commit is contained in:
parent
ad6ce46f49
commit
6fe93cdeb3
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue