1
0
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:
Nedyalko Dyakov
2025-10-25 21:49:41 +03:00
committed by GitHub
parent bc4230766a
commit 33696fb002

View File

@@ -234,7 +234,7 @@ func (cn *Conn) SetUsable(usable bool) {
// This is a backward-compatible wrapper around the state machine. // This is a backward-compatible wrapper around the state machine.
func (cn *Conn) IsInited() bool { func (cn *Conn) IsInited() bool {
state := cn.stateMachine.GetState() 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 return state != StateCreated && state != StateInitializing && state != StateClosed
} }