[New-bugs-announce] [issue10993] HTTPSConnection does not close when call close() method
report at bugs.python.org
Mon Jan 24 11:51:43 CET 2011
New submission from Tanakorn Leesatapornwongsa <tanakorn.lsv at gmail.com>:
With this code on python 2.6, I found that HTTPSConnection does not close connection properly.
from httplib import HTTPSConnection
for i in range(1000):
https = HTTPSConnection("google.com")
response = https.getresponse()
After searching python library, I guess that in ssl.py, implementation of close() method of SSLSocket is wrong.
socket.close(self) should not be called when self._makefile_refs < 1 but should be call when self._makefile_refs == 1, isn't it?
I modified the code, made the patch and attached it with this issue.
components: Library (Lib)
title: HTTPSConnection does not close when call close() method
versions: Python 2.6
Added file: http://bugs.python.org/file20501/ssl.py.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce