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. 

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1401397 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-10-23 19:15:34 +00:00
parent 78265ea211
commit 7a2293d743
1 changed files with 3 additions and 1 deletions

View File

@ -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 TcpTransport {
DataByteArrayInputStream dis = new DataByteArrayInputStream(inputBuffer.array());
codec.parse(dis, readSize);
receiveCounter += readSize;
// clear the buffer
inputBuffer.clear();
}
} catch (IOException e) {
onException(e);