summaryrefslogtreecommitdiff
path: root/Lib/ssl.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-04-23 23:25:45 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2010-04-23 23:25:45 +0000
commitc9725893ebfc49498433535913597a1d475bcd6e (patch)
treeaab83479e068d3c2040d318f85143c0f65ee7d50 /Lib/ssl.py
parentb44fc0e138a7d26bb6a534275797bd5017d55205 (diff)
downloadcpython-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.py4
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)