From 4655d25d0882c49b6c6f6fbf593ce1d908e8ef6a Mon Sep 17 00:00:00 2001 From: paulaan Date: Thu, 2 May 2019 17:40:57 +0700 Subject: [PATCH] [fanout] Remove defect --- messaging/fanout.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {