Skip to content

Commit

Permalink
Don't reset webstatus.master to None when it is replaced
Browse files Browse the repository at this point in the history
This is an awful hack, but re-creating WebStatus on every reconfig is
also a bad idea.  Fixes #2301.
  • Loading branch information
djmitche committed May 27, 2012
1 parent 63c3a92 commit cc5b2ed
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion master/buildbot/status/master.py
Expand Up @@ -69,7 +69,15 @@ def reconfigService(self, new_config):
for sr in list(self):
yield defer.maybeDeferred(lambda :
sr.disownServiceParent())
sr.master = None

# WebStatus instances tend to "hang around" longer than we'd like -
# if there's an ongoing HTTP request, or even a connection held
# open by keepalive, then users may still be talking to an old
# WebStatus. So WebStatus objects get to keep their `master`
# attribute, but all other status objects lose theirs. And we want
# to test this without importing WebStatus, so we use name
if not sr.__class__.__name__.endswith('WebStatus'):
sr.master = None

for sr in new_config.status:
sr.master = self.master
Expand Down

0 comments on commit cc5b2ed

Please sign in to comment.