Commit a2201d88 authored by Benjamin Peterson's avatar Benjamin Peterson

initialize _makefile_refs earlier so things don't blow up when close() is called in the constructor

parent 35b6135b
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment