diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-23 11:16:48 -0600 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-23 11:16:48 -0600 |
commit | 5f6b89bda3cc9797186c567b6be5c6d8feedb3ec (patch) | |
tree | febe67ec8aa5b780be072efe52b1d84bd545d122 | |
parent | 95b616480e7c17d85c2c3623bd2f6be51fd42139 (diff) | |
download | cpython-git-5f6b89bda3cc9797186c567b6be5c6d8feedb3ec.tar.gz |
initialize _makefile_refs earlier so things don't blow up when close() is called in the constructor
-rw-r--r-- | Lib/ssl.py | 2 |
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): |