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.
........
This commit is contained in:
Antoine Pitrou 2010-04-23 23:35:01 +00:00
parent 3df58d11be
commit d4030dacc6
3 changed files with 28 additions and 1 deletions

View file

@ -320,7 +320,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)