mirror of
https://github.com/redis/go-redis.git
synced 2025-12-02 06:22:31 +03:00
Update internal/pool/conn.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -234,7 +234,7 @@ func (cn *Conn) SetUsable(usable bool) {
|
||||
// This is a backward-compatible wrapper around the state machine.
|
||||
func (cn *Conn) IsInited() bool {
|
||||
state := cn.stateMachine.GetState()
|
||||
// Connection is initialized if it's in READY or any post-initialization state
|
||||
// Connection is initialized if it's in IDLE or any post-initialization state
|
||||
return state != StateCreated && state != StateInitializing && state != StateClosed
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user