From 63ba854c07382d112a90384034bf36ccf270fa31 Mon Sep 17 00:00:00 2001 From: wero <981819494@qq.com> Date: Sat, 20 Aug 2022 14:08:56 +0800 Subject: [PATCH] fix consumer doesn't consume message because of blocked on Lock in some case --- consumer/process_queue.go | 1 + 1 file changed, 1 insertion(+) diff --git a/consumer/process_queue.go b/consumer/process_queue.go index 92a82a35..2d35c076 100644 --- a/consumer/process_queue.go +++ b/consumer/process_queue.go @@ -104,6 +104,7 @@ func (pq *processQueue) putMessage(messages ...*primitive.MessageExt) { if !pq.order { select { case <-pq.closeChan: + pq.mutex.Unlock() return case pq.msgCh <- messages: }