From b3653bcfb147af0db63e89d733a4ac287183c751 Mon Sep 17 00:00:00 2001 From: zhouyuyan Date: Wed, 31 Jan 2018 10:59:59 +0800 Subject: [PATCH] fix #14 --- broker/dispatcher.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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)