summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-23 11:16:48 -0600
committerBenjamin Peterson <benjamin@python.org>2014-11-23 11:16:48 -0600
commit25227a4e0351e94faf393d35a0fa48d02d9ea656 (patch)
tree040f1b994db54eee1a2f7546e0a22f8d44e6517d
parent29de910f61224444c384bc57c12bcffa620b8788 (diff)
downloadcpython-25227a4e0351e94faf393d35a0fa48d02d9ea656.tar.gz
initialize _makefile_refs earlier so things don't blow up when close() is called in the constructor
-rw-r--r--Lib/ssl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 025aadeff4..4b682848e7 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -483,6 +483,7 @@ class SSLSocket(socket):
server_hostname=None,
_context=None):
+ self._makefile_refs = 0
if _context:
self._context = _context
else:
@@ -565,7 +566,6 @@ class SSLSocket(socket):
except (OSError, ValueError):
self.close()
raise
- self._makefile_refs = 0
@property
def context(self):