mirror of
https://github.com/redis/go-redis.git
synced 2025-10-18 22:08:50 +03:00
add Used to clarify the state of the conn
This commit is contained in:
1
redis.go
1
redis.go
@@ -549,6 +549,7 @@ func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
|
||||
// mark the connection as usable and inited
|
||||
// once returned to the pool as idle, this connection can be used by other clients
|
||||
cn.SetUsable(true)
|
||||
cn.Used.Store(false)
|
||||
cn.Inited.Store(true)
|
||||
|
||||
// Set the connection initialization function for potential reconnections
|
||||
|
Reference in New Issue
Block a user