This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix server_close() method for ThreadingHTTPServer and TCPServer class
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ROUX antoine2, python-dev
Priority: normal Keywords: patch

Created on 2020-04-16 18:13 by ROUX antoine2, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
testHttpServer.py ROUX antoine2, 2020-04-16 18:13 problematic use case of ThreadingHTTPServer()
Pull Requests
URL Status Linked Edit
PR 19556 open python-dev, 2020-04-16 18:24
Messages (1)
msg366619 - (view) Author: ROUX antoine (ROUX antoine2) * Date: 2020-04-16 18:13
Maybe : 

Main problem is currently ThreadingHTTPServer which extends socketserver.ThreadingMixIn and HTTPServer don't overload his server_close() method. This method server_close is defined into both parent class and should be both call in implementation to avoid shadow definition.

Second and linked to first problem is the class socketserver.TCPServer which is parent class of HTTPServer and extend of BaseServer don't overload method server_close() properly indeed this overload call self.socket.close() but should also call super().shutdown() to avoid infinite thread join into ThreadingHTTPServer server_close() method.

Open to advice
History
Date User Action Args
2022-04-11 14:59:29adminsetgithub: 84485
2020-04-16 18:24:18python-devsetkeywords: + patch
nosy: + python-dev

pull_requests: + pull_request18903
stage: patch review
2020-04-16 18:13:08ROUX antoine2create