1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Merge pull request #2333 from monkey92t/fix_2312

feat: add ClientName option
This commit is contained in:
Monkey
2022-12-28 22:31:25 +08:00
committed by GitHub
11 changed files with 121 additions and 15 deletions

View File

@ -260,6 +260,10 @@ func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
pipe.ReadOnly(ctx)
}
if c.opt.ClientName != "" {
pipe.ClientSetName(ctx, c.opt.ClientName)
}
return nil
})
if err != nil {