activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1401397 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mqtt/MQTTNIOTransport.java
Date Tue, 23 Oct 2012 19:15:34 GMT
Author: tabish
Date: Tue Oct 23 19:15:34 2012
New Revision: 1401397

URL: http://svn.apache.org/viewvc?rev=1401397&view=rev
Log:
fix and test for: https://issues.apache.org/jira/browse/AMQ-4106

NIO based transports weren't updating the receive counter in the TcpTransport which can lead
to the inactivity monitor mistakenly shutting down the connection.  

Forgot one. 

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mqtt/MQTTNIOTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mqtt/MQTTNIOTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mqtt/MQTTNIOTransport.java?rev=1401397&r1=1401396&r2=1401397&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mqtt/MQTTNIOTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mqtt/MQTTNIOTransport.java
Tue Oct 23 19:15:34 2012
@@ -27,6 +27,7 @@ import java.nio.channels.SelectionKey;
 import java.nio.channels.SocketChannel;
 
 import javax.net.SocketFactory;
+
 import org.apache.activemq.transport.nio.NIOOutputStream;
 import org.apache.activemq.transport.nio.SelectorManager;
 import org.apache.activemq.transport.nio.SelectorSelection;
@@ -103,9 +104,10 @@ public class MQTTNIOTransport extends Tc
                 DataByteArrayInputStream dis = new DataByteArrayInputStream(inputBuffer.array());
                 codec.parse(dis, readSize);
 
+                receiveCounter += readSize;
+
                 // clear the buffer
                 inputBuffer.clear();
-
             }
         } catch (IOException e) {
             onException(e);



Mime
View raw message