cshannon commented on code in PR #2474:
URL: https://github.com/apache/activemq/pull/2474#discussion_r3822209723
##########
activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java:
##########
@@ -613,26 +613,36 @@ public void stop() throws Exception {
}
protected void initializeStreams() throws Exception {
+ // receiveCounter feeds AbstractInactivityMonitor.readCheck() so only
increment when there is data read
TcpBufferedInputStream buffIn = new
TcpBufferedInputStream(socket.getInputStream(), ioBufferSize) {
@Override
public int read() throws IOException {
- receiveCounter.incrementAndGet();
- return super.read();
+ int result = super.read();
+ if (result >= 0) {
Review Comment:
Nevermind, this returns the byte so 0 is valid so >= 0 is correct
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact