lgoldstein commented on a change in pull request #176: URL: https://github.com/apache/mina-sshd/pull/176#discussion_r512126291
########## File path: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java ########## @@ -1757,14 +1764,18 @@ protected void receiveNewKeys() throws Exception { this, inCipher, outCipher, recommendedByteRekeyBlocks, maxRekeyBlocks); } + resetCounters(); + lastKeyTimeValue.set(Instant.now()); + firstKexPacketFollows = null; + } + + protected void resetCounters() { inBytesCount.set(0L); outBytesCount.set(0L); inPacketsCount.set(0L); outPacketsCount.set(0L); inBlocksCount.set(0L); outBlocksCount.set(0L); - lastKeyTimeValue.set(Instant.now()); - firstKexPacketFollows = null; Review comment: If it becomes too cumbersome you can use `@SuppressWarnings("checkstyle:...the rule")` - I do not encourage it, but sometimes it is better than the alternative ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org