commit | 320d9652a05e166fa5167b837dfc0b31d3d957c1 | [log] [tgz] |
---|---|---|
author | xujianhai666 <52450794+xujianhai666@users.noreply.github.com> | Wed Jan 22 16:27:08 2020 +0800 |
committer | wenfeng <sxian.wang@gmail.com> | Wed Jan 22 16:27:08 2020 +0800 |
tree | a3a11632a87bd338d7da62d6d58354d938df10e6 | |
parent | 893736076e4f26cf1b595bad8f8c216a7111e6c8 [diff] |
fix: lock is extra when not orderly consume (#393) Closes #365
diff --git a/consumer/push_consumer.go b/consumer/push_consumer.go index a593239..79f22f5 100644 --- a/consumer/push_consumer.go +++ b/consumer/push_consumer.go
@@ -168,6 +168,10 @@ go primitive.WithRecover(func() { // initial lock. + if !pc.consumeOrderly { + return + } + time.Sleep(1000 * time.Millisecond) pc.lockAll()