Skip to content
Snippets Groups Projects
Commit 7e39889f authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

fixed a compile error

parent 3cabe198
No related branches found
No related tags found
1 merge request!170Release
...@@ -28,7 +28,7 @@ const ( ...@@ -28,7 +28,7 @@ const (
trySix = 24 * time.Hour trySix = 24 * time.Hour
// Amount of tries past which the // Amount of tries past which the
// backoff will not increase // backoff will not increase
cappedTries = 6 cappedTries = 7
) )
var backOffTable = [cappedTries]time.Duration{tryZero, tryOne, tryTwo, tryThree, tryFour, tryFive, trySix} var backOffTable = [cappedTries]time.Duration{tryZero, tryOne, tryTwo, tryThree, tryFour, tryFive, trySix}
...@@ -115,8 +115,8 @@ func (m *Manager) processUncheckedRounds(checkInterval time.Duration, backoffTab ...@@ -115,8 +115,8 @@ func (m *Manager) processUncheckedRounds(checkInterval time.Duration, backoffTab
func isRoundCheckDue(tries uint64, ts time.Time, backoffTable [cappedTries]time.Duration) bool { func isRoundCheckDue(tries uint64, ts time.Time, backoffTable [cappedTries]time.Duration) bool {
now := netTime.Now() now := netTime.Now()
if tries > cappedTries { if tries > uint64(len(backoffTable)) {
tries = cappedTries tries = uint64(len(backoffTable))
} }
roundCheckTime := ts.Add(backoffTable[tries]) roundCheckTime := ts.Add(backoffTable[tries])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment