summaryrefslogtreecommitdiffstats
path: root/Lib/ssl.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-04-23 23:25:45 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-04-23 23:25:45 (GMT)
commitb558f17b188fecc67ac1cd1d2fe8e8247afe38bf (patch)
tree50108a5e26ee77b1e31fc472bfc5c7f77faa56e0 /Lib/ssl.py
parentdfb299bb95040d5e96690afd93f7212e81b70722 (diff)
downloadcpython-b558f17b188fecc67ac1cd1d2fe8e8247afe38bf.zip
cpython-b558f17b188fecc67ac1cd1d2fe8e8247afe38bf.tar.gz
cpython-b558f17b188fecc67ac1cd1d2fe8e8247afe38bf.tar.bz2
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.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 4f291f4..9e88073 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)