Merged revisions 80428 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80428 | antoine.pitrou | 2010-04-24 01:25:45 +0200 (sam., 24 avril 2010) | 4 lines
Issue #5238: Calling makefile() on an SSL object would prevent the
underlying socket from being closed until all objects get truely destroyed.
........
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 0ebef58..3ee3d6a 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -320,7 +320,9 @@
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)