diff --git a/nodepool/nodepool.py b/nodepool/nodepool.py index b68866669..decb0eb5c 100644 --- a/nodepool/nodepool.py +++ b/nodepool/nodepool.py @@ -1338,7 +1338,8 @@ class NodePool(threading.Thread): if self.isAlive(): self.join() - self.zk.disconnect() + if self.zk: + self.zk.disconnect() self.log.debug("Finished stopping") def loadConfig(self):