Skip to content

Commit 91efc19

Browse files
committed
Clarify too many failed acquire attempts error message
#2451
1 parent affeba1 commit 91efc19

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pgxpool/pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ func (p *Pool) Acquire(ctx context.Context) (c *Conn, err error) {
652652

653653
return cr.getConn(p, res), nil
654654
}
655-
return nil, errors.New("pgxpool: detected infinite loop acquiring connection; likely bug in PrepareConn or BeforeAcquire hook")
655+
return nil, errors.New("pgxpool: too many failed attempts acquiring connection; likely bug in PrepareConn, BeforeAcquire, or ShouldPing hook")
656656
}
657657

658658
// AcquireFunc acquires a *Conn and calls f with that *Conn. ctx will only affect the Acquire. It has no effect on the

0 commit comments

Comments
 (0)