[pypy-commit] pypy py3.5: #2900 fix in the _ssl module with poll()
arigo
pypy.commits at gmail.com
Sun Oct 7 10:39:40 EDT 2018
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r95184:000e19254270
Date: 2018-10-07 16:39 +0200
http://bitbucket.org/pypy/pypy/changeset/000e19254270/
Log: #2900 fix in the _ssl module with poll()
diff --git a/lib_pypy/_cffi_ssl/_stdssl/__init__.py b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
--- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py
+++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
@@ -186,7 +186,7 @@
# Prefer poll, if available, since you can poll() any fd
# which can't be done with select().
if HAVE_POLL:
- p.register(sock.fileno(), POLLOUT | POLLIN)
+ p.register(sock.fileno(), POLLOUT if writing else POLLIN)
rc = len(p.poll(timeout * 1000.0))
else:
More information about the pypy-commit
mailing list