Rebind TCPserver onthefly ..

Harald Schneider h_schneider at
Thu Mar 20 13:52:09 CET 2003


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

Thanks for your answers!

All the best,

More information about the Python-list mailing list