activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: ARTEMIS-1243 Release ReferenceCounted messages
Date Wed, 21 Jun 2017 15:21:47 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/1.x 8679aeb73 -> ec76e4b3c


ARTEMIS-1243 Release ReferenceCounted messages

(cherry picked from commit eaadc2472934ec1c18e3146b9ee94427d7719df4)


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

Branch: refs/heads/1.x
Commit: ec76e4b3cf39d76f6c284f576a969d32ff326e64
Parents: 8679aeb
Author: Helge Waastad <helge.waastad@datametrix.no>
Authored: Tue Jun 20 18:56:58 2017 +0200
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Jun 21 11:21:16 2017 -0400

----------------------------------------------------------------------
 .../activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec76e4b3/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java
b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java
index be0197f..81d3197 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java
@@ -37,6 +37,7 @@ import io.netty.handler.codec.mqtt.MqttSubAckPayload;
 import io.netty.handler.codec.mqtt.MqttSubscribeMessage;
 import io.netty.handler.codec.mqtt.MqttUnsubAckMessage;
 import io.netty.handler.codec.mqtt.MqttUnsubscribeMessage;
+import io.netty.util.ReferenceCountUtil;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.spi.core.protocol.ConnectionEntry;
 
@@ -147,6 +148,8 @@ public class MQTTProtocolHandler extends ChannelInboundHandlerAdapter
{
       } catch (Exception e) {
          log.debug("Error processing Control Packet, Disconnecting Client", e);
          disconnect(true);
+      } finally {
+         ReferenceCountUtil.release(msg);
       }
    }
 


Mime
View raw message