diff --git a/conn.go b/conn.go index ad21ccdb..c6bd5529 100644 --- a/conn.go +++ b/conn.go @@ -153,10 +153,6 @@ func connect(ctx context.Context, config *ConnConfig) (c *Conn, err error) { c.log(ctx, LogLevelInfo, "Dialing PostgreSQL server", map[string]interface{}{"host": config.Config.Host}) } c.pgConn, err = pgconn.ConnectConfig(ctx, &config.Config) - if err != nil { - return nil, err - } - if err != nil { if c.shouldLog(LogLevelError) { c.log(ctx, LogLevelError, "connect failed", map[string]interface{}{"err": err})