initialize _makefile_refs earlier so things don't blow up when close() is called in the constructor
This commit is contained in:
parent
95b616480e
commit
5f6b89bda3
|
@ -483,6 +483,7 @@ class SSLSocket(socket):
|
||||||
server_hostname=None,
|
server_hostname=None,
|
||||||
_context=None):
|
_context=None):
|
||||||
|
|
||||||
|
self._makefile_refs = 0
|
||||||
if _context:
|
if _context:
|
||||||
self._context = _context
|
self._context = _context
|
||||||
else:
|
else:
|
||||||
|
@ -565,7 +566,6 @@ class SSLSocket(socket):
|
||||||
except (OSError, ValueError):
|
except (OSError, ValueError):
|
||||||
self.close()
|
self.close()
|
||||||
raise
|
raise
|
||||||
self._makefile_refs = 0
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def context(self):
|
def context(self):
|
||||||
|
|
Loading…
Reference in New Issue