Terry J. Reedy <tjre...@udel.edu> added the comment: The behavior is as documented, so this is a feature request. The 3.1.2 doc in 20.19.2. Server Objects says "BaseServer.shutdown() Tells the serve_forever() loop to stop and waits until it does."
I presume this allows subsequent .handle_request() and ..serve_forever() calls, as well as others, so I think the request is a bad idea. For automatic closing, use 'with' statements and a context manager and checkout contextlib. This is their main purpose. I am not sure what "The server classes support the following class variables: BaseServer.allow_reuse_address Whether the server will allow the reuse of an address. This defaults to False, and can be set in subclasses to change the policy." or whether it would help you. ---------- nosy: +terry.reedy resolution: -> rejected status: open -> closed type: behavior -> feature request _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8506> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com