From db145bfd8e1a4bb35132c95ec18d9d9a978617b0 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Thu, 18 May 2023 08:24:32 +0200 Subject: [PATCH] wtclient: check un-checked errors Some errors are not checked during startup and shutdown of the tower client. These are checked now. --- watchtower/wtclient/client.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/watchtower/wtclient/client.go b/watchtower/wtclient/client.go index 9c190f810..cff768569 100644 --- a/watchtower/wtclient/client.go +++ b/watchtower/wtclient/client.go @@ -678,7 +678,11 @@ func (c *TowerClient) Start() error { // Start the task pipeline to which new backup tasks will be // submitted from active links. - c.pipeline.Start() + err = c.pipeline.Start() + if err != nil { + returnErr = err + return + } c.wg.Add(1) go c.backupDispatcher() @@ -727,7 +731,10 @@ func (c *TowerClient) Stop() error { // 4. Since all valid tasks have been assigned to session // queues, we no longer need to negotiate sessions. - c.negotiator.Stop() + err = c.negotiator.Stop() + if err != nil { + returnErr = err + } c.log.Debugf("Waiting for active session queues to finish "+ "draining, stats: %s", c.stats)