diff --git a/broker/dispatcher.go b/broker/dispatcher.go index 6256762..8fd11d6 100644 --- a/broker/dispatcher.go +++ b/broker/dispatcher.go @@ -34,10 +34,8 @@ func (d *Dispatcher) dispatch() { for { select { case msg := <-MSGPool[idx].queue: - go func(msg *Message) { - msgChannel := <-d.WorkerPool - msgChannel <- msg - }(msg) + msgChannel := <-d.WorkerPool + msgChannel <- msg } } }(i)