mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [mina-sshd] jvz commented on a change in pull request #176: [SSHD-1017] Add support for chacha20-poly1305@openssh.com
Date Sun, 25 Oct 2020 20:25:27 GMT

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Mime
View raw message