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.

Author martin.panter
Recipients docs@python, martin.panter
Date 2015-01-17.04:32:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Running the example from the Asynchronous Mixins section of the “socketserver” documentation generates a ResourceWarning:

$ ./python -btWall
Server loop running in thread: Thread-1
Received: Thread-2: Hello World 1
Received: Thread-3: Hello World 2
Received: Thread-4: Hello World 3
sys:1: ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('', 43804)>

There is a server_close() method mentioned in the doc string of the BaseServer class, so I assume it is meant to be part of the API. But there is no mention of it in the reference documentation.

I think server.server_close() should be documented, and called after server.shutdown() in the example. A further enhancement might be to turn BaseServer into a context manager, but I would be happy with using the existing server_close() method.
Date User Action Args
2015-01-17 04:32:55martin.pantersetrecipients: + martin.panter, docs@python
2015-01-17 04:32:55martin.pantersetmessageid: <>
2015-01-17 04:32:54martin.panterlinkissue23254 messages
2015-01-17 04:32:54martin.pantercreate