Skip to content

Commit

Permalink
Replace deprecated jitter functions
Browse files Browse the repository at this point in the history
  • Loading branch information
espadolini committed Nov 13, 2024
1 parent 9422a05 commit 4e799bc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/proxy/peer/internal/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ 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 @@ -83,8 +82,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: utils.HalfJitter(pingInterval),
Jitter: retryutils.NewSeventhJitter(),
FirstDuration: retryutils.HalfJitter(pingInterval),
Jitter: retryutils.SeventhJitter,
})
defer ivl.Stop()

Expand Down

0 comments on commit 4e799bc

Please sign in to comment.