Ping only makes sense with a context for timeout
This commit is contained in:
@@ -1388,11 +1388,7 @@ func (c *Conn) cancelQuery() {
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) Ping() error {
|
func (c *Conn) Ping(ctx context.Context) error {
|
||||||
return c.PingContext(context.Background())
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Conn) PingContext(ctx context.Context) error {
|
|
||||||
_, err := c.ExecEx(ctx, ";", nil)
|
_, err := c.ExecEx(ctx, ";", nil)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user