From d29ba77e0ddb290602a79dd0b8bbdb8d45e5718c Mon Sep 17 00:00:00 2001 From: zooko Date: Wed, 23 Apr 2008 07:03:02 +0100 Subject: [PATCH] don't retire a missing-notification-timer until you finish accepting a slave Previously, we retired the timer when we began accepting the slave. However, if we then detected duplicate connection and rejected one of the connections, then the resulting detach would start a new missing-notification-timer. With this patch, the missing-notification-timer that is started by detaching a connection is soon retired by the other connection leading to acceptance of the buildslave. So this probably fixes the other way that issue #211 was happening (after the previous patch that was intended to fix #211). --- buildbot/buildslave.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buildbot/buildslave.py b/buildbot/buildslave.py index 2be7974..0daf74c 100644 --- a/buildbot/buildslave.py +++ b/buildbot/buildslave.py @@ -108,10 +108,6 @@ class BuildSlave(NewCredPerspective, service.MultiService): @return: a Deferred that fires with a suitable pb.IPerspective to give to the slave (i.e. 'self')""" - if self.missing_timer: - self.missing_timer.cancel() - self.missing_timer = None - if self.slave: # uh-oh, we've got a duplicate slave. The most likely # explanation is that the slave is behind a slow link, thinks we @@ -180,6 +176,10 @@ class BuildSlave(NewCredPerspective, service.MultiService): self.slave = bot log.msg("bot attached") self.messageReceivedFromSlave() + if self.missing_timer: + self.missing_timer.cancel() + self.missing_timer = None + return self.updateSlave() d.addCallback(_accept_slave) -- 2.11.4.GIT