Patch #461321: Support None as a timeout in poll2 and poll3.
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index f221d4c..5175002 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -110,8 +110,9 @@
     import poll
     if map is None:
         map=socket_map
-    # timeout is in milliseconds
-    timeout = int(timeout*1000)
+    if timeout is not None:
+        # timeout is in milliseconds
+        timeout = int(timeout*1000)
     if map:
         l = []
         for fd, obj in map.items():
@@ -142,8 +143,9 @@
     # Use the poll() support added to the select module in Python 2.0
     if map is None:
         map=socket_map
-    # timeout is in milliseconds
-    timeout = int(timeout*1000)
+    if timeout is not None:
+        # timeout is in milliseconds
+        timeout = int(timeout*1000)
     pollster = select.poll()
     if map:
         for fd, obj in map.items():