diff options
author | Charles-François Natali <neologix@free.fr> | 2011-07-14 17:53:38 (GMT) |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2011-07-14 17:53:38 (GMT) |
commit | e22813067e4f62629a9c24947c29a55861fb05f1 (patch) | |
tree | 2f57fbd12d675bd086fde2327fc8e9c904892a60 | |
parent | 778db49da9eeb23af4410f592165d7e46d4a285a (diff) | |
download | cpython-e22813067e4f62629a9c24947c29a55861fb05f1.zip cpython-e22813067e4f62629a9c24947c29a55861fb05f1.tar.gz cpython-e22813067e4f62629a9c24947c29a55861fb05f1.tar.bz2 |
Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
-rw-r--r-- | Lib/asyncore.py | 6 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py index 00464a9..3f0d2d3 100644 --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -130,7 +130,8 @@ def poll(timeout=0.0, map=None): 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) @@ -177,7 +178,8 @@ def poll2(timeout=0.0, map=None): 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 @@ -22,6 +22,8 @@ What's New in Python 3.1.4? Library ------- +- Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. + - Issue #12009: Fixed regression in netrc file comment handling. Extension Modules |