From 2c91dfeca358d68dc9317e31a8191b887a582c83 Mon Sep 17 00:00:00 2001 From: Federico Nafria Date: Mon, 16 Dec 2024 18:54:44 +0100 Subject: [PATCH] Simplify conditions --- internal/client/client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/client/client.go b/internal/client/client.go index 36cc63fc87..ba91b8f1b3 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -546,9 +546,9 @@ func (a *APIClient) SwitchContext(name string) error { return err } if a.getConnOK() { - if err := a.invalidateCache(); err != nil { - return err - } + log.Debug().Msgf("No cache to invalidate") + } else if err := a.invalidateCache(); err != nil { + return err } a.reset() ResetMetrics()