Author: Alex Gaynor <[email protected]>
Branch: stdlib-2.7.8
Changeset: r73083:10154fa64f9d
Date: 2014-08-27 09:59 -0700
http://bitbucket.org/pypy/pypy/changeset/10154fa64f9d/
Log: (Originally by pjenvey) Dont' call close here, if the handshake
fails we still need to be able to call close on teh original socket
diff --git a/lib-python/2.7/ssl.py b/lib-python/2.7/ssl.py
--- a/lib-python/2.7/ssl.py
+++ b/lib-python/2.7/ssl.py
@@ -115,11 +115,10 @@
raise NotImplementedError("only stream sockets are supported")
socket.__init__(self, _sock=sock._sock)
- # "close" the original socket: it is not usable any more.
- # this only calls _drop(), which should not actually call
- # the operating system's close() because the reference
- # counter is greater than 1 (we hold one too).
- sock.close()
+ # "close" the original socket: it is not usable any more. which should
+ # not actually call the operating system's close() because the
+ # reference counter is greater than 1 (we hold one too).
+ sock._sock._drop()
if ciphers is None and ssl_version != _SSLv2_IF_EXISTS:
ciphers = _DEFAULT_CIPHERS
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit