File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,7 +132,8 @@ def poll(timeout=0.0, map=None):
132132 is_w = obj .writable ()
133133 if is_r :
134134 r .append (fd )
135- if is_w :
135+ # accepting sockets should not be writable
136+ if is_w and not obj .accepting :
136137 w .append (fd )
137138 if is_r or is_w :
138139 e .append (fd )
@@ -179,7 +180,8 @@ def poll2(timeout=0.0, map=None):
179180 flags = 0
180181 if obj .readable ():
181182 flags |= select .POLLIN | select .POLLPRI
182- if obj .writable ():
183+ # accepting sockets should not be writable
184+ if obj .writable () and not obj .accepting :
183185 flags |= select .POLLOUT
184186 if flags :
185187 # Only check for exceptions if object was either readable
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ Core and Builtins
2727Library
2828-------
2929
30+ - Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
31+
3032- Issue #4376: ctypes now supports nested structures in a endian different than
3133 the parent structure. Patch by Vlad Riscutia.
3234
You can’t perform that action at this time.
0 commit comments