]> granicus.if.org Git - python/commitdiff
asyncore: POLLERR, POLLHUP and POLLNVAL are ignored when passed as input flag
authorCharles-François Natali <neologix@free.fr>
Sat, 5 Nov 2011 13:16:01 +0000 (14:16 +0100)
committerCharles-François Natali <neologix@free.fr>
Sat, 5 Nov 2011 13:16:01 +0000 (14:16 +0100)
to poll(2): don't set them.

Lib/asyncore.py

index 6d4bbbe309c3645f189f488de31c6ac29418d6c6..920444d89abc4d1971e00bf99f8b116789daaee6 100644 (file)
@@ -181,9 +181,6 @@ def poll2(timeout=0.0, map=None):
             if obj.writable() and not obj.accepting:
                 flags |= select.POLLOUT
             if flags:
-                # Only check for exceptions if object was either readable
-                # or writable.
-                flags |= select.POLLERR | select.POLLHUP | select.POLLNVAL
                 pollster.register(fd, flags)
         try:
             r = pollster.poll(timeout)