Deprecate CheckConn in favor of Ping
This commit is contained in:
committed by
Jack Christensen
parent
26c79eb215
commit
3ea2f57d8b
+1
-1
@@ -504,7 +504,7 @@ func (p *Pool) Acquire(ctx context.Context) (*Conn, error) {
|
||||
cr := res.Value()
|
||||
|
||||
if res.IdleDuration() > time.Second {
|
||||
err := cr.conn.PgConn().CheckConn()
|
||||
err := cr.conn.Ping(ctx)
|
||||
if err != nil {
|
||||
res.Destroy()
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user