Author terry.reedy
Recipients othererik, santoso.wijaya, terry.reedy
Date 2010-08-05.20:25:45
SpamBayes Score 0.00827082
Marked as misclassified No
Message-id <1281039949.23.0.334008898233.issue8506@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-08-05 20:25:49terry.reedysetrecipients: + terry.reedy, santoso.wijaya, othererik
2010-08-05 20:25:49terry.reedysetmessageid: <1281039949.23.0.334008898233.issue8506@psf.upfronthosting.co.za>
2010-08-05 20:25:47terry.reedylinkissue8506 messages
2010-08-05 20:25:45terry.reedycreate