update to fix leak in SSL code

This commit is contained in:
Bill Janssen 2007-12-14 22:08:56 +00:00
parent 517b9ddda2
commit 54cc54c1fe
4 changed files with 225 additions and 68 deletions

View file

@ -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