[issue12463] Calling SocketServer.shutdown() when server_forever() was not called will hang

Michael P. Reilly report at bugs.python.org
Mon Dec 26 16:48:47 CET 2011


Michael P. Reilly <arcege at gmail.com> added the comment:

Here is a patch to socketserver.py which can be applied to 2.6, 2.7 and 3.2.  The fix is for BaseServer, ForkingMixIn and ThreadingMixIn.  All three now correctly respond to the shutdown method.  I have no way of testing Windows or MacOSX (based on docs, MacOSX should work without changes); the ForkingMixIn will raise an AssertionError on non-POSIX systems.  There may be a better way of handling non-POSIX systems, but again, I'm not able to test or develop at this time.  I'll also update the simpletest.py script.

----------
versions: +Python 3.2
Added file: http://bugs.python.org/file24093/socketserver.patch

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


More information about the Python-bugs-list mailing list