[Part of patch #909005] Set initial poll flags
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index f5657ff..6e128b1 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -136,9 +136,9 @@
     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: