diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-04-23 23:25:45 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-04-23 23:25:45 +0000 |
commit | c9725893ebfc49498433535913597a1d475bcd6e (patch) | |
tree | aab83479e068d3c2040d318f85143c0f65ee7d50 /Lib/ssl.py | |
parent | b44fc0e138a7d26bb6a534275797bd5017d55205 (diff) | |
download | cpython-c9725893ebfc49498433535913597a1d475bcd6e.tar.gz |
Issue #5238: Calling makefile() on an SSL object would prevent the
underlying socket from being closed until all objects get truely destroyed.
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r-- | Lib/ssl.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py index 4f291f4486..9e88073916 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -324,7 +324,9 @@ class SSLSocket(socket): from the socket module.""" 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) |