File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -536,11 +536,12 @@ func (p *ConnPool) popIdle() (*Conn, error) {
536536 // LIFO: put at beginning (will be picked up last since we pop from end)
537537 p .idleConns = append ([]* Conn {cn }, p .idleConns ... )
538538 }
539+ cn = nil
539540 }
540541
541542 // If we exhausted all attempts without finding a usable connection, return nil
542- if attempts > 1 && attempts >= maxAttempts {
543- // internal.Logger.Printf(context.Background(), "redis: connection pool: failed to get a usable connection after %d attempts", attempts)
543+ if int32 ( attempts ) >= p . poolSize . Load () {
544+ internal .Logger .Printf (context .Background (), "redis: connection pool: failed to get a usable connection after %d attempts" , attempts )
544545 return nil , nil
545546 }
546547
You can’t perform that action at this time.
0 commit comments