1
0
mirror of https://github.com/redis/go-redis.git synced 2025-04-17 20:17:02 +03:00

fix: log errors from cmdsInfoCache

Since the error gets swallowed in cmdInfo(), it's important to log it so
it's possible for the user to see what the error was.
This commit is contained in:
Jacob Hoffman-Andrews 2022-07-06 14:28:42 -07:00
parent 9f5aacde23
commit fa4d1ea839

View File

@ -1605,6 +1605,7 @@ func (c *ClusterClient) cmdsInfo(ctx context.Context) (map[string]*CommandInfo,
func (c *ClusterClient) cmdInfo(name string) *CommandInfo {
cmdsInfo, err := c.cmdsInfoCache.Get(c.ctx)
if err != nil {
internal.Logger.Printf(context.TODO(), "getting command info: %s", err)
return nil
}