Update dropper.go

This commit is contained in:
maradini77 2025-11-15 15:30:51 +01:00 committed by GitHub
parent 5e6f7374de
commit 8b3ce0b6f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -145,6 +145,9 @@ func randomDuration(min, max time.Duration) time.Duration {
if min > max { if min > max {
panic("min duration must be less than or equal to max duration") panic("min duration must be less than or equal to max duration")
} }
if min == max {
return min
}
return time.Duration(mrand.Int63n(int64(max-min)) + int64(min)) return time.Duration(mrand.Int63n(int64(max-min)) + int64(min))
} }