diff -r fd8dc3746992 Lib/asyncore.py --- a/Lib/asyncore.py Sat Jul 02 14:43:11 2011 +0200 +++ b/Lib/asyncore.py Tue Jul 05 20:49:17 2011 +0200 @@ -132,7 +132,8 @@ 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) @@ -179,7 +180,8 @@ 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