提交 36422c52 编写于 作者: S sunhangda

[ISSUE #3066]producing a ghost consumer

上级 2b236c3c
...@@ -863,7 +863,7 @@ public class MQClientInstance { ...@@ -863,7 +863,7 @@ public class MQClientInstance {
} }
} }
public boolean registerConsumer(final String group, final MQConsumerInner consumer) { public synchronized boolean registerConsumer(final String group, final MQConsumerInner consumer) {
if (null == group || null == consumer) { if (null == group || null == consumer) {
return false; return false;
} }
...@@ -877,9 +877,9 @@ public class MQClientInstance { ...@@ -877,9 +877,9 @@ public class MQClientInstance {
return true; return true;
} }
public void unregisterConsumer(final String group) { public synchronized void unregisterConsumer(final String group) {
this.consumerTable.remove(group); this.consumerTable.remove(group);
this.unregisterClientWithLock(null, group); this.unregisterClient(null, group);
} }
private void unregisterClientWithLock(final String producerGroup, final String consumerGroup) { private void unregisterClientWithLock(final String producerGroup, final String consumerGroup) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册