Skip to content

Commit

Permalink
Simplify conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
driv committed Dec 16, 2024
1 parent 169aeda commit 2c91dfe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 2c91dfe

Please sign in to comment.