ooici/coi-services — pull request #228 by daf (2012-08-09 14:45:50+00:00)
Title: Safer termination of SimpleCtdDataProducer

For @swarbhanu

The SimpleCtdDataProducer was running a while True loop with no way of breaking out of it. It was causing it to try and keep publishing even when it was supposed to have been shut down, so long after the connection dies and the channel goes away, it keeps trying to use it.

This patch applies a simple pattern for both safe shutdown and how to do the timeout. Comments in line.