Skip to content

Commit

Permalink
clients: log 'cached client', caching is the point, not being a client
Browse files Browse the repository at this point in the history
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
  • Loading branch information
sttts committed Nov 21, 2023
1 parent 829caea commit bd125c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (c *Cache) Get(cr auth.Credentials, o ...GetOption) (client.Client, error)
c.mx.RUnlock()

if ok {
log.Debug("Used existing client",
log.Debug("Used existing cached client",
"new-expiry", time.Now().Add(c.expiry),
)
sn.expiration.Reset(c.expiry)
Expand Down Expand Up @@ -284,7 +284,7 @@ func (c *Cache) Get(cr auth.Credentials, o ...GetOption) (client.Client, error)
// another gorouting might have set the session.
if sn, ok := c.active[id]; ok {
c.mx.Unlock()
log.Debug("Used existing client",
log.Debug("Used existing cached client",
"duration", time.Since(started),
"new-expiry", newExpiry,
)
Expand Down Expand Up @@ -321,7 +321,7 @@ func (c *Cache) Get(cr auth.Credentials, o ...GetOption) (client.Client, error)
return nil, errors.New(errWaitForCacheSync)
}

log.Debug("Created client",
log.Debug("Created cached client",
"duration", time.Since(started),
"new-expiry", newExpiry,
)
Expand Down

0 comments on commit bd125c4

Please sign in to comment.