diff --git a/messaging/fanout.go b/messaging/fanout.go index d2c3304..83cf36e 100644 --- a/messaging/fanout.go +++ b/messaging/fanout.go @@ -30,8 +30,8 @@ func (p *Pipeline) Start() { if expectationWorkers > MaxWorkers { expectationWorkers = expectationWorkers % MaxWorkers } - for index, c := range pipe.workers { - if expectationWorkers < index { + for _, c := range pipe.workers { + if expectationWorkers < int(c.index) { break } select {