From 4d34fb4e64c8c4ee46df05c62e7cd31ff9b27e6c Mon Sep 17 00:00:00 2001 From: braginini Date: Tue, 2 Nov 2021 14:51:29 +0100 Subject: [PATCH] chore: decrease backoff maxinterval to avoid long connection waiting times on the client app --- client/cmd/up.go | 4 ++-- management/client/client.go | 4 ++-- signal/client/client.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/cmd/up.go b/client/cmd/up.go index 48141d4901a..228ec5d8264 100644 --- a/client/cmd/up.go +++ b/client/cmd/up.go @@ -123,8 +123,8 @@ func runClient() error { InitialInterval: time.Second, RandomizationFactor: backoff.DefaultRandomizationFactor, Multiplier: backoff.DefaultMultiplier, - MaxInterval: time.Hour, - MaxElapsedTime: 24 * 3 * time.Hour, + MaxInterval: 10 * time.Second, + MaxElapsedTime: 24 * 3 * time.Hour, //stop the client after 3 days trying (must be a huge problem, e.g permission denied) Stop: backoff.Stop, Clock: backoff.SystemClock, } diff --git a/management/client/client.go b/management/client/client.go index 51a6b7b8703..860afb13ac3 100644 --- a/management/client/client.go +++ b/management/client/client.go @@ -70,8 +70,8 @@ func defaultBackoff(ctx context.Context) backoff.BackOff { InitialInterval: 800 * time.Millisecond, RandomizationFactor: backoff.DefaultRandomizationFactor, Multiplier: backoff.DefaultMultiplier, - MaxInterval: 15 * time.Minute, - MaxElapsedTime: time.Hour, //stop after an hour of trying, the error will be propagated to the general retry of the client + MaxInterval: 10 * time.Second, + MaxElapsedTime: 30 * time.Minute, //stop after an 30 min of trying, the error will be propagated to the general retry of the client Stop: backoff.Stop, Clock: backoff.SystemClock, }, ctx) diff --git a/signal/client/client.go b/signal/client/client.go index 5702a8c1c18..52c06aa8411 100644 --- a/signal/client/client.go +++ b/signal/client/client.go @@ -81,8 +81,8 @@ func defaultBackoff(ctx context.Context) backoff.BackOff { InitialInterval: 800 * time.Millisecond, RandomizationFactor: backoff.DefaultRandomizationFactor, Multiplier: backoff.DefaultMultiplier, - MaxInterval: 15 * time.Minute, - MaxElapsedTime: time.Hour, //stop after an hour of trying, the error will be propagated to the general retry of the client + MaxInterval: 10 * time.Second, + MaxElapsedTime: 30 * time.Minute, //stop after an 30 min of trying, the error will be propagated to the general retry of the client Stop: backoff.Stop, Clock: backoff.SystemClock, }, ctx)