From 77b728d5e1b6c112ea0d08191f46347af4e091dc Mon Sep 17 00:00:00 2001 From: Edoardo Spadolini Date: Wed, 13 Nov 2024 21:22:26 +0100 Subject: [PATCH] Revert "Replace deprecated jitter functions" This reverts commit 76b73e8e55a8497d8fc2b01d4a72bff342350ab1. --- lib/proxy/peer/internal/metrics.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/proxy/peer/internal/metrics.go b/lib/proxy/peer/internal/metrics.go index 802d33746f774..885f095684c77 100644 --- a/lib/proxy/peer/internal/metrics.go +++ b/lib/proxy/peer/internal/metrics.go @@ -26,6 +26,7 @@ import ( "github.com/gravitational/teleport" "github.com/gravitational/teleport/api/utils/retryutils" + "github.com/gravitational/teleport/lib/utils" "github.com/gravitational/teleport/lib/utils/interval" ) @@ -82,8 +83,8 @@ func RunClientPing(ctx context.Context, cc ClientConn, pings, failedPings promet const pingInterval = time.Minute ivl := interval.New(interval.Config{ Duration: pingInterval * 14 / 13, - FirstDuration: retryutils.HalfJitter(pingInterval), - Jitter: retryutils.SeventhJitter, + FirstDuration: utils.HalfJitter(pingInterval), + Jitter: retryutils.NewSeventhJitter(), }) defer ivl.Stop()