diff --git a/gateway/gateway_impl.go b/gateway/gateway_impl.go index e1d5d5cb..4ea8665a 100644 --- a/gateway/gateway_impl.go +++ b/gateway/gateway_impl.go @@ -94,8 +94,7 @@ func (g *gatewayImpl) open(ctx context.Context) error { g.lastHeartbeatSent = time.Now().UTC() conn, rs, err := g.config.Dialer.DialContext(ctx, gatewayURL, nil) if err != nil { - g.Close(ctx) - body := "empty" + body := "" if rs != nil && rs.Body != nil { defer func() { _ = rs.Body.Close()