You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by mi...@apache.org on 2018/01/23 17:07:40 UTC
[1/2] activemq-artemis git commit: ARTEMIS-1408 document
synchronization
Repository: activemq-artemis
Updated Branches:
refs/heads/master 6ad29e403 -> 8666cb61d
ARTEMIS-1408 document synchronization
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/439761d6
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/439761d6
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/439761d6
Branch: refs/heads/master
Commit: 439761d6b8fe1c7650aa07434e0f98609e4d4084
Parents: 6ad29e4
Author: Justin Bertram <jb...@apache.org>
Authored: Tue Jan 23 10:58:07 2018 -0600
Committer: Michael Pearce <mi...@me.com>
Committed: Tue Jan 23 17:07:33 2018 +0000
----------------------------------------------------------------------
.../activemq/artemis/core/protocol/mqtt/MQTTSessionState.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/439761d6/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionState.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionState.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionState.java
index 4b5c648..6c94c15 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionState.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionState.java
@@ -80,6 +80,7 @@ public class MQTTSessionState {
}
boolean addSubscription(MqttTopicSubscription subscription, WildcardConfiguration wildcardConfiguration) {
+ // synchronized to prevent race with removeSubscription
synchronized (subscriptions) {
addressMessageMap.putIfAbsent(MQTTUtil.convertMQTTAddressFilterToCore(subscription.topicName(), wildcardConfiguration), new ConcurrentHashMap<Long, Integer>());
@@ -98,6 +99,7 @@ public class MQTTSessionState {
}
void removeSubscription(String address) {
+ // synchronized to prevent race with addSubscription
synchronized (subscriptions) {
subscriptions.remove(address);
addressMessageMap.remove(address);
[2/2] activemq-artemis git commit: This closes #1811
Posted by mi...@apache.org.
This closes #1811
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8666cb61
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8666cb61
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8666cb61
Branch: refs/heads/master
Commit: 8666cb61d82344a0264493151bb783b61d216b64
Parents: 6ad29e4 439761d
Author: Michael Pearce <mi...@me.com>
Authored: Tue Jan 23 17:07:34 2018 +0000
Committer: Michael Pearce <mi...@me.com>
Committed: Tue Jan 23 17:07:34 2018 +0000
----------------------------------------------------------------------
.../activemq/artemis/core/protocol/mqtt/MQTTSessionState.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------