From e3390fcb15c52a8e2a33fd9002680852b12e2f67 Mon Sep 17 00:00:00 2001 From: Sudarsan Reddy Date: Thu, 25 Aug 2022 18:52:18 +0100 Subject: [PATCH] TUN-6705: Tunnel should retry connections forever Protocolbackoff arrays now have Retryforever flag set to true to enable cloudflared to keep trying to reconnect perpetually. --- supervisor/supervisor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supervisor/supervisor.go b/supervisor/supervisor.go index af556b16..135c59a7 100644 --- a/supervisor/supervisor.go +++ b/supervisor/supervisor.go @@ -268,7 +268,7 @@ func (s *Supervisor) initialize( s.config.HAConnections = availableAddrs } s.tunnelsProtocolFallback[0] = &protocolFallback{ - retry.BackoffHandler{MaxRetries: s.config.Retries}, + retry.BackoffHandler{MaxRetries: s.config.Retries, RetryForever: true}, s.config.ProtocolSelector.Current(), false, } @@ -290,7 +290,7 @@ func (s *Supervisor) initialize( // At least one successful connection, so start the rest for i := 1; i < s.config.HAConnections; i++ { s.tunnelsProtocolFallback[i] = &protocolFallback{ - retry.BackoffHandler{MaxRetries: s.config.Retries}, + retry.BackoffHandler{MaxRetries: s.config.Retries, RetryForever: true}, s.config.ProtocolSelector.Current(), false, }