You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Reza Farivar (JIRA)" <ji...@apache.org> on 2015/08/05 22:19:05 UTC
[jira] [Created] (ZOOKEEPER-2241) In Login.java, a tgt with a small
expiry time will break the code
Reza Farivar created ZOOKEEPER-2241:
---------------------------------------
Summary: In Login.java, a tgt with a small expiry time will break the code
Key: ZOOKEEPER-2241
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2241
Project: ZooKeeper
Issue Type: Bug
Reporter: Reza Farivar
Priority: Minor
In the Login.java code, if a TGT with a small expiration date (e.g. 5 minutes) is passed in, the refresh date is set at a value less than the MIN_TIME_BEFORE_RELOGIN, which is a minute by default. As a result, the condition in line 153 evaluates to true, setting nextRefresh to now. Then right after, in line 176, it checks the nextRefresh againt now, and will jump to line 186 and just exit (without throwing an exception), exiting the refresh thread.
https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/Login.java#L186
Possible Solution: changing line 176 to
if (now <= nextRefresh)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)