Stopping SocketServer on Python 2.5

Falcolas garrickp at
Wed Mar 11 23:11:39 CET 2009

On Mar 11, 1:11 pm, David George <d... at> wrote:
> Again, problem here is the issue of being unable to kill the server
> while it's waiting on a request. In theory, i could force it to
> continue by sending some sort of junk data with the method i use to
> stop the server, but that seems a bit hacky, don't you think?


I agree, it does.

I'm in a bit over my head at this point, but does setting
self.socket.settimeout(0.5) cause the call to get_request (and thus
self.socket.accept()) to timeout? If so, that may be your ticket,
since socket.error exceptions are already caught by the TCPServer


More information about the Python-list mailing list