diff --git a/server/jetstream_cluster.go b/server/jetstream_cluster.go index c8ecda0745d..b0bd1c9d017 100644 --- a/server/jetstream_cluster.go +++ b/server/jetstream_cluster.go @@ -8162,7 +8162,7 @@ func (mset *stream) processSnapshot(snap *StreamReplicatedState) (e error) { // If we are interest based make sure to check our ack floor state. // We will delay a bit to allow consumer states to also catchup. if mset.isInterestRetention() { - fire := time.Duration(rand.Intn(int(10*time.Second))) + 5*time.Second + fire := time.Duration(rand.Intn(10)+5) * time.Second time.AfterFunc(fire, mset.checkInterestState) } }()