fedora-infra/fmn.consumer — pull request #19 by ralphbean (2014-05-13 20:41:57+00:00)
Title: Only reconnect to IRC if not shutting down.

As things stand right now, when the irc bot loses its connection, it just
tries to reconnect. If it can't do that, then it waits 60 seconds and tries
again.. forever. This is good, generally. If our bot goes offline due to a
netsplit or something, it can get itself back on freenode without human
intervention.

However, if we're trying to stop the bot.. say, with
``service fedmsg-hub restart`` or a simple control-c, then it loses its
connection and, before it can finish terminating, tries to reconnect again.
It never actually exits and you have to hit it with ``kill -9``.

This commit makes it so that when the core hub calls ``.stop()`` on the
``FMNConsumer``, then that consumer will tell its subordinates to give up the
:ghost:.