Add infinite loop to collectd client rate-limiter

pull/2987/head
Philip O'Toole 2015-06-12 15:25:16 -07:00
parent 45802a5911
commit 1eb0347670
1 changed files with 6 additions and 4 deletions

View File

@ -32,10 +32,12 @@ func main() {
go func() {
ticker := time.NewTicker(time.Second)
select {
case <-ticker.C:
for i := 0; i < *rate; i++ {
rateLimiter <- i
for {
select {
case <-ticker.C:
for i := 0; i < *rate; i++ {
rateLimiter <- i
}
}
}
}()