1
0
mirror of https://github.com/redis/go-redis.git synced 2025-12-02 06:22:31 +03:00

Update internal/pool/pool.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Nedyalko Dyakov
2025-10-25 21:49:01 +03:00
committed by GitHub
parent 65a6ece947
commit 0964dccbf1

View File

@@ -693,7 +693,9 @@ func (p *ConnPool) putConn(ctx context.Context, cn *Conn, freeTurn bool) {
if err != nil { if err != nil {
// Hook changed the state (e.g., to UNUSABLE for handoff) // Hook changed the state (e.g., to UNUSABLE for handoff)
// Keep the state set by the hook and pool the connection anyway // Keep the state set by the hook and pool the connection anyway
internal.Logger.Printf(ctx, "Connection state changed by hook to %v, pooling as-is", currentState) if internal.Logger.Enabled(ctx, internal.LogLevelDebug) {
internal.Logger.Printf(ctx, "Connection state changed by hook to %v, pooling as-is", currentState)
}
} }
// unusable conns are expected to become usable at some point (background process is reconnecting them) // unusable conns are expected to become usable at some point (background process is reconnecting them)