From: Benjamin Peterson Date: Sun, 23 Nov 2014 17:16:48 +0000 (-0600) Subject: initialize _makefile_refs earlier so things don't blow up when close() is called... X-Git-Tag: v2.7.9rc1~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f6b89bda3cc9797186c567b6be5c6d8feedb3ec;p=python initialize _makefile_refs earlier so things don't blow up when close() is called in the constructor --- 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):