1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Add OnConnect context

This commit is contained in:
Vladimir Mihailenco
2020-06-10 10:36:22 +03:00
parent e779df5ab1
commit ef82e3705c
7 changed files with 27 additions and 18 deletions

View File

@ -269,7 +269,7 @@ func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
}
if c.opt.OnConnect != nil {
return c.opt.OnConnect(conn)
return c.opt.OnConnect(ctx, conn)
}
return nil
}