diff --git a/pgconn/pgconn.go b/pgconn/pgconn.go index 2a3c5936..9277d4a8 100644 --- a/pgconn/pgconn.go +++ b/pgconn/pgconn.go @@ -263,7 +263,7 @@ func (pgConn *PgConn) ReceiveMessage() (pgproto3.BackendMessage, error) { msg, err := pgConn.Frontend.Receive() if err != nil { // Close on anything other than timeout error - everything else is fatal - if err, ok := err.(net.Error); !ok && err.Timeout() { + if err, ok := err.(net.Error); !(ok && err.Timeout()) { pgConn.hardClose() }