diff options
author | Charles-François Natali <neologix@free.fr> | 2011-07-14 19:57:35 +0200 |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2011-07-14 19:57:35 +0200 |
commit | 4cb3ea789edea69c3b285d863fdcb12c2388f359 (patch) | |
tree | 71d3751a4ea9ec3475c691b27fd4b4f22031407b | |
parent | d53e7ad7f89096a566dba360757caf76da206a7b (diff) | |
download | cpython-4cb3ea789edea69c3b285d863fdcb12c2388f359.tar.gz |
Merge - 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 5d7bddaf84..7f42d39f33 100644 --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -132,7 +132,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) @@ -179,7 +180,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 @@ -27,6 +27,8 @@ Core and Builtins Library ------- +- Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. + - Issue #4376: ctypes now supports nested structures in a endian different than the parent structure. Patch by Vlad Riscutia. |