You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/05/25 11:20:52 UTC

[GitHub] [kafka] tombentley commented on a diff in pull request #12179: [KAFKA-13848] Clients remain connected after SASL re-authentication f…

tombentley commented on code in PR #12179:
URL: https://github.com/apache/kafka/pull/12179#discussion_r881527740


##########
clients/src/main/java/org/apache/kafka/common/security/authenticator/SaslServerAuthenticator.java:
##########
@@ -681,8 +681,8 @@ else if (connectionsMaxReauthMs == null)
                 else
                     retvalSessionLifetimeMs = zeroIfNegative(
                             Math.min(credentialExpirationMs - authenticationEndMs, connectionsMaxReauthMs));
-                if (retvalSessionLifetimeMs > 0L)
-                    sessionExpirationTimeNanos = authenticationEndNanos + 1000 * 1000 * retvalSessionLifetimeMs;
+
+                sessionExpirationTimeNanos = authenticationEndNanos + 1000 * 1000 * retvalSessionLifetimeMs;

Review Comment:
   Probably worth a comment explaining that `sessionExpirationTimeNanos` should always be set to a non-null value.



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org