newbie question about SocketServer
Steve Horsley
steve.horsley at gmail.com
Fri Oct 21 15:31:41 EDT 2005
akameswaran at gmail.com wrote:
> Is it just me or do the server_close() methods do squat? I'm primarily
> working with a ThreadingTCPServer object and trying to create a simple
> server that can shut itself down. But even simplest cases don't seem
> to work.
>
> Admittedly I am trying it from within my handler class, but for some
> odd reason, the server is allways willing to handle one more request
> before dying. Then it dies.
>
I suspect that the server thread itself is stuck in
socket.accept(), and won't exit until the next call arrives. Try
calling server_close and then making a brief connection to the
server to wake it up.
HTH
Steve
More information about the Python-list
mailing list