From 9c74626d226753b61b8bdf0103749511975b6f70 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 11 Feb 2017 18:44:39 -0600 Subject: [PATCH] Ping implemented in terms of PingContext --- conn.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conn.go b/conn.go index 3ee0fe6b..51fab0e5 100644 --- a/conn.go +++ b/conn.go @@ -1385,8 +1385,7 @@ func (c *Conn) cancelQuery() error { } func (c *Conn) Ping() error { - _, err := c.Exec(";") - return err + return c.PingContext(context.Background()) } func (c *Conn) PingContext(ctx context.Context) error {