mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: use int64 in publisher delay (#19457)
This commit is contained in:
@@ -136,8 +136,8 @@ func (p *tallymanPublisher) Start() error {
|
||||
if p.initialDelay <= 0 {
|
||||
// Pick a random time between tallymanPublishInitialMinimumDelay and
|
||||
// tallymanPublishInterval.
|
||||
maxPlusDelay := int(tallymanPublishInterval - tallymanPublishInitialMinimumDelay)
|
||||
plusDelay, err := cryptorand.Intn(maxPlusDelay)
|
||||
maxPlusDelay := tallymanPublishInterval - tallymanPublishInitialMinimumDelay
|
||||
plusDelay, err := cryptorand.Int63n(int64(maxPlusDelay))
|
||||
if err != nil {
|
||||
return xerrors.Errorf("could not generate random start delay: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user