From bb530b87dd13c893edfd96edd024c9efd579b633 Mon Sep 17 00:00:00 2001 From: Rachel Williams Date: Wed, 26 Aug 2020 12:19:24 -0700 Subject: [PATCH] TUN-3328: Filter out free tunnel has started log from UI --- origin/tunnel.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/origin/tunnel.go b/origin/tunnel.go index 6e7a0291..29dde019 100644 --- a/origin/tunnel.go +++ b/origin/tunnel.go @@ -537,15 +537,17 @@ func processRegistrationSuccess( logger.Infof("Each HA connection's tunnel IDs: %v", config.Metrics.tunnelsHA.String()) } - // Print out the user's trial zone URL in a nice box (if they requested and got one) - if isTrialTunnel := config.Hostname == ""; isTrialTunnel { - if url, err := url.Parse(registration.Url); err == nil { - for _, line := range asciiBox(trialZoneMsg(url.String()), 2) { - logger.Info(line) + // Print out the user's trial zone URL in a nice box (if they requested and got one and UI flag is not set) + if config.TunnelEventChan == nil { + if isTrialTunnel := config.Hostname == ""; isTrialTunnel { + if url, err := url.Parse(registration.Url); err == nil { + for _, line := range asciiBox(trialZoneMsg(url.String()), 2) { + logger.Info(line) + } + } else { + logger.Error("Failed to connect tunnel, please try again.") + return fmt.Errorf("empty URL in response from Cloudflare edge") } - } else { - logger.Error("Failed to connect tunnel, please try again.") - return fmt.Errorf("empty URL in response from Cloudflare edge") } }