From e1397613fd8ac3b4cac43a567613e48afcbeac17 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Fri, 19 May 2017 08:02:51 -0500 Subject: [PATCH] Ping only makes sense with a context for timeout --- conn.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/conn.go b/conn.go index 4a77f769..bd098646 100644 --- a/conn.go +++ b/conn.go @@ -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 }