buildbot/buildbot — pull request #997 by delanne (2013-12-06 14:02:34+00:00)
Title: Fix: unsubscribe StatusPush

StatusPush doesn't unsubscribe. As a consequence, if buildbot is reconfigured, then you will receive several time the same event, because several instance of StatusPush are active.

Here's a copy/paste of the IRC discussion:
```
Hi,
I notice a weird behaviour when I reconfigure buildbot.
status instance (like words.IRC, status_push.HttpStatusPush) never unsubscribe ... As a consequence, once I reconfigure buildbot, I receive the same event several times
because there's several instance of status_push.HttpStatusPush
I activate the Telnet Manhole, and here's what I see:
When I start buildbot:
master.status.watchers
[, ]
that's exactly what I'm expected.
If I reconfigure buildbot 1 time:
[, , , ]
old instance aren't remove from master.status.watchers
IMO, in the stopService function (of IRC.words and status_push.HttpStatusPush) we should have this:
self.status.unsubscribe(self)
(in the startService function, the status instance subscribe ... so I'm expected that the status instance must unsubscribe in the stopService function)
Am I right ? or did I miss something ?
xavierd: yeah, that's been fixed recently in the IRC daemon, but I didn't know it existed in HttpStatusPush
djmitche, ok
djmitche, my fix is to add this line: self.status.unsubscribe(self)
```