diff --git a/stdlib/sql.go b/stdlib/sql.go index f688f70c..c5be1a3f 100644 --- a/stdlib/sql.go +++ b/stdlib/sql.go @@ -548,7 +548,7 @@ func (c *Conn) ResetSession(ctx context.Context) error { now := time.Now() if now.Sub(c.lastResetSessionTime) > time.Second { - if err := c.conn.PgConn().CheckConn(); err != nil { + if err := c.conn.PgConn().Ping(ctx); err != nil { return driver.ErrBadConn } }