go /
time /
711ca1cb87636abec28122ef3bc6a77269d433f3 rate: ignore burst in WaitN when rate limit is Inf
WaitN fails when the number of tokens requested exceeds the limiter's
burst size, even when the rate limit is Inf. The documented behavior is
that the burst size is ignored when the rate limit is Inf. Change WaitN
to conform with the documentation, and add tests.
Fixes golang/go#16854
Change-Id: I3ca0a8dac47641c76bed4258cd7010f0a704ff8c
Reviewed-on: https://go-review.googlesource.com/28610
Run-TryBot: Sameer Ajmani <sameer@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2 files changed