I didn't read over your code, but this is something that I've independently implemented. You can see my implementation at <https://github.com/habnabit/polecat/blob/master/polecat.py>. The Site subclass does some other monitoring-related things, but you should be able to tease out just the graceful shutdown parts if that's all you want.
Polecat needs some work and a lot of documentation, but for now, the way to do a graceful shutdown is to make a PolecatSite and then addSystemEventTrigger('before', 'shutdown', yourPolecatSite.gracefullyStopActiveClients). _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python