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:
Andrew M. Kuchling 2004-07-07 12:23:53 +00:00
parent ad6ce46f49
commit 6fe93cdeb3
1 changed files with 2 additions and 2 deletions

View File

@ -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: