Ping only makes sense with a context for timeout

batch-wip
Jack Christensen 2017-05-19 08:02:51 -05:00
parent 479ebdfa19
commit e1397613fd
1 changed files with 1 additions and 5 deletions

View File

@ -1388,11 +1388,7 @@ func (c *Conn) cancelQuery() {
}()
}
func (c *Conn) Ping() error {
return c.PingContext(context.Background())
}
func (c *Conn) PingContext(ctx context.Context) error {
func (c *Conn) Ping(ctx context.Context) error {
_, err := c.ExecEx(ctx, ";", nil)
return err
}