mirror of https://github.com/apache/activemq.git
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. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1401397 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
78265ea211
commit
7a2293d743
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue