Fix sampler for low Burst values (#19)

This commit is contained in:
millerlogic 2017-11-27 10:05:35 -08:00 committed by Olivier Poitrey
parent c8e50a6043
commit 1251b38a89
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ type BurstSampler struct {
// Sample implements the Sampler interface. // Sample implements the Sampler interface.
func (s *BurstSampler) Sample(lvl Level) bool { func (s *BurstSampler) Sample(lvl Level) bool {
if s.Burst > 9 && s.Period > 0 { if s.Burst > 0 && s.Period > 0 {
if s.inc() <= s.Burst { if s.inc() <= s.Burst {
return true return true
} }