From 6c806fe4fbd0dd6c856cdb859ee0193e1e156863 Mon Sep 17 00:00:00 2001 From: h3nng Date: Sat, 8 Oct 2016 17:30:51 +0800 Subject: [PATCH] Update PulsarClientImpl.java synchronized should be used for final map 'consumers' other than method parameter 'consumer'. --- .../java/com/yahoo/pulsar/client/impl/PulsarClientImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-client/src/main/java/com/yahoo/pulsar/client/impl/PulsarClientImpl.java b/pulsar-client/src/main/java/com/yahoo/pulsar/client/impl/PulsarClientImpl.java index 34f2c66085293..462f35ea7d047 100644 --- a/pulsar-client/src/main/java/com/yahoo/pulsar/client/impl/PulsarClientImpl.java +++ b/pulsar-client/src/main/java/com/yahoo/pulsar/client/impl/PulsarClientImpl.java @@ -418,7 +418,7 @@ void cleanupProducer(ProducerBase producer) { } void cleanupConsumer(ConsumerBase consumer) { - synchronized (consumer) { + synchronized (consumers) { consumers.remove(consumer); } }