activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [01/11] activemq-artemis git commit: Fix NPE with null session in MQTTConnectionManager.disconnect()
Date Thu, 28 Jul 2016 21:27:08 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master fc35f6128 -> c530ce103


Fix NPE with null session in MQTTConnectionManager.disconnect()


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/9963f960
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/9963f960
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/9963f960

Branch: refs/heads/master
Commit: 9963f96033418107f5caa5eb86f16ce74ac28312
Parents: a6a03d4
Author: Ville Skyttä <ville.skytta@iki.fi>
Authored: Thu Jul 28 23:23:40 2016 +0300
Committer: Ville Skyttä <ville.skytta@iki.fi>
Committed: Thu Jul 28 23:30:02 2016 +0300

----------------------------------------------------------------------
 .../artemis/core/protocol/mqtt/MQTTConnectionManager.java       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9963f960/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java
b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java
index a3b8b78..a05ecb5 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java
@@ -106,8 +106,11 @@ public class MQTTConnectionManager {
    }
 
    void disconnect() {
+      if (session == null) {
+         return;
+      }
       try {
-         if (session != null && session.getSessionState() != null) {
+         if (session.getSessionState() != null) {
             String clientId = session.getSessionState().getClientId();
             if (clientId != null)
                CONNECTED_CLIENTS.remove(clientId);


Mime
View raw message