Skip to content

Commit

Permalink
pass rng to redistributeRDY
Browse files Browse the repository at this point in the history
  • Loading branch information
philhofer committed Jul 9, 2014
1 parent 33a255e commit 3f1673e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ func (r *Consumer) rdyLoop() {
}
}
case <-redistributeTicker.C:
r.redistributeRDY()
r.redistributeRDY(rng)
case <-r.exitChan:
goto exit
}
Expand Down Expand Up @@ -798,8 +798,7 @@ func (r *Consumer) sendRDY(c *Conn, count int64) error {
return nil
}

func (r *Consumer) redistributeRDY() {
var rng = rand.New(rand.NewSource(time.Now().UnixNano()))
func (r *Consumer) redistributeRDY(rng *rand.Rand) {
if r.inBackoffBlock() {
return
}
Expand Down

0 comments on commit 3f1673e

Please sign in to comment.