From dev-return-38485-apmail-mina-dev-archive=mina.apache.org@mina.apache.org Mon Oct 26 17:06:15 2020 Return-Path: X-Original-To: apmail-mina-dev-archive@www.apache.org Delivered-To: apmail-mina-dev-archive@www.apache.org Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with ESMTP id 8BC641A9D7 for ; Mon, 26 Oct 2020 17:06:14 +0000 (UTC) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id DA4DC123288 for ; Mon, 26 Oct 2020 17:06:13 +0000 (UTC) Received: (qmail 74365 invoked by uid 500); 26 Oct 2020 17:06:13 -0000 Delivered-To: apmail-mina-dev-archive@mina.apache.org Received: (qmail 74332 invoked by uid 500); 26 Oct 2020 17:06:13 -0000 Mailing-List: contact dev-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@mina.apache.org Received: (qmail 74314 invoked by uid 99); 26 Oct 2020 17:06:13 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2020 17:06:13 +0000 From: =?utf-8?q?GitBox?= To: dev@mina.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bmina-sshd=5D_lgoldstein_commented_on_a_change_in_p?= =?utf-8?q?ull_request_=23176=3A_=5BSSHD-1017=5D_Add_support_for_chacha20-po?= =?utf-8?q?ly1305=40openssh=2Ecom?= Message-ID: <160373197333.32230.12313808568704815913.asfpy@gitbox.apache.org> Date: Mon, 26 Oct 2020 17:06:13 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: 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: users@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org For additional commands, e-mail: dev-help@mina.apache.org