[issue31639] http.server and SimpleHTTPServer hang after a few requests

Glenn Linderman report at bugs.python.org
Wed Dec 27 18:56:05 EST 2017


Glenn Linderman <v+python at g.nevcal.com> added the comment:

I don't know how to look back at the previous version of the PR, I was barely able to find the "current version" each time. The following line is in the current version:

daemon_threads = True

Whether it was in the previous version, I don't know, but I didn't notice it, but maybe I overlooked it due to other changes in the same area, which are now gone. This line was not in the old suggestion that I had found and tried. When I added it, my test case started working. I have no idea what the line really does, but the HTTP server is a daemon, and we are adding threading, so it sounds appropriate.

I do wonder if it should somehow be put in the definition of ThreadedHTTPServer instead of "pass". And the old solution I had found had called the HTTPServer.__init__ which yours does not, which was surprising, but I'll not argue with success.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31639>
_______________________________________


More information about the Python-bugs-list mailing list