jvz commented on a change in pull request #176:
URL: https://github.com/apache/mina-sshd/pull/176#discussion_r511644126



##########
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:
       Not deleted, just moved a little bit. This method keeps hitting the 100 
line limit from checkstyle, so I had to refactor it a little.




----------------------------------------------------------------
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

Reply via email to