Commits

Anonymous committed 42ec507

Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.

  • Participants
  • Parent commits 0d4ca1e
  • Branches 3.1

Comments (0)

Files changed (2)

             is_w = obj.writable()
             if is_r:
                 r.append(fd)
-            if is_w:
+            # accepting sockets should not be writable
+            if is_w and not obj.accepting:
                 w.append(fd)
             if is_r or is_w:
                 e.append(fd)
             flags = 0
             if obj.readable():
                 flags |= select.POLLIN | select.POLLPRI
-            if obj.writable():
+            # accepting sockets should not be writable
+            if obj.writable() and not obj.accepting:
                 flags |= select.POLLOUT
             if flags:
                 # Only check for exceptions if object was either readable
 Library
 -------
 
+- Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
+
 - Issue #12009: Fixed regression in netrc file comment handling.
 
 Extension Modules