Rebind TCPserver onthefly ..

Harald Schneider h_schneider at marketmix.com
Thu Mar 20 07:52:09 EST 2003


Hi,

I have a xmlrpcserver class, derived from TCPServer. The server does a
blocking request on a dynamic IP.
I spawn a thread that compares the address resolved from a dynamic name
service with that IP bound to the server. If they are different, then the
dynamic IP has changed and the server should be rebound to the new IP.

My problem is: How can I restart a TCPServer instance that hangs in a
blocking handle_request() ?
Under which conditions will handle_request() abort and return?
Pinging the server won't work, because he waits on an IP that is not valid
anymore.

Thanks for your answers!

All the best,
Harald






More information about the Python-list mailing list