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