[issue5238] ssl makefile never closes socket

Constantine Sapuntzakis report at bugs.python.org
Thu Apr 30 20:34:36 CEST 2009


Constantine Sapuntzakis <csapuntz at gmail.com> added the comment:

I ran into this problem when trying to use wrapsocket with httplib.py
and came up with the same fix.

The problem turns out to be even simpler than a ref counting issue.

In the current tree, the _fileobject constructor is called without the
close = True argument, As a result, _fileobject._close gets set to False
and _fileobject.close() method never propagates the close to
SSLSocket.close(). See line 269 of socket.py.

----------
nosy: +csapuntz

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5238>
_______________________________________


More information about the Python-bugs-list mailing list