Skip to content

Commit

Permalink
Revert "Replace deprecated jitter functions"
Browse files Browse the repository at this point in the history
This reverts commit 76b73e8.
  • Loading branch information
espadolini committed Nov 13, 2024
1 parent 76b73e8 commit 77b728d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/proxy/peer/internal/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 77b728d

Please sign in to comment.