mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
update to fix leak in SSL code
This commit is contained in:
parent
517b9ddda2
commit
54cc54c1fe
4 changed files with 225 additions and 68 deletions
|
@ -174,11 +174,13 @@ class socket(_socket.socket):
|
|||
if self._closed:
|
||||
self.close()
|
||||
|
||||
def _real_close(self):
|
||||
_socket.socket.close(self)
|
||||
|
||||
def close(self):
|
||||
self._closed = True
|
||||
if self._io_refs <= 0:
|
||||
_socket.socket.close(self)
|
||||
|
||||
self._real_close()
|
||||
|
||||
def fromfd(fd, family, type, proto=0):
|
||||
""" fromfd(fd, family, type[, proto]) -> socket object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue