Commit 4cb31312 authored by Denis Bilenko's avatar Denis Bilenko

Python Issue #5238: Calling makefile() on an SSL object would prevent the...

Python Issue #5238: Calling makefile() on an SSL object would prevent the underlying socket from being closed until all objects get truely destroyed. Patch by Antoine Pitrou.

from http://svn.python.org/view?view=rev&revision=80428
parent f847c1f1
...@@ -367,7 +367,9 @@ class SSLSocket(socket): ...@@ -367,7 +367,9 @@ class SSLSocket(socket):
works with the SSL connection. Just use the code works with the SSL connection. Just use the code
from the socket module.""" from the socket module."""
self._makefile_refs += 1 self._makefile_refs += 1
return _fileobject(self, mode, bufsize) # close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def wrap_socket(sock, keyfile=None, certfile=None, def wrap_socket(sock, keyfile=None, certfile=None,
......
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