]> granicus.if.org Git - python/commitdiff
[Part of patch #909005] Set initial poll flags
authorAndrew M. Kuchling <amk@amk.ca>
Sun, 21 Mar 2004 19:50:09 +0000 (19:50 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Sun, 21 Mar 2004 19:50:09 +0000 (19:50 +0000)
Lib/asyncore.py

index f5657ff9fe2e49bfe86102af8bb5153705a49d4a..6e128b114868395bd281e0d05fd97ce3187c48d8 100644 (file)
@@ -136,9 +136,9 @@ def poll2(timeout=0.0, map=None):
     pollster = select.poll()
     if map:
         for fd, obj in map.items():
-            flags = 0
+            flags = select.POLLERR | select.POLLHUP | select.POLLNVAL
             if obj.readable():
-                flags = select.POLLIN
+                flags = select.POLLIN | select.POLLPRI
             if obj.writable():
                 flags = flags | select.POLLOUT
             if flags: