Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/curator/pull/157#discussion_r66905969
  
    --- Diff: 
curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
 ---
    @@ -252,7 +252,9 @@ private void processEvents()
                 {
                     int lastNegotiatedSessionTimeoutMs = 
client.getZookeeperClient().getLastNegotiatedSessionTimeoutMs();
                     int useSessionTimeoutMs = (lastNegotiatedSessionTimeoutMs 
> 0) ? lastNegotiatedSessionTimeoutMs : sessionTimeoutMs;
    -                int pollMaxMs = (useSessionTimeoutMs * 2) / 3; // 2/3 of 
session timeout
    +                long elapsedMs = startOfSuspendedEpoch == 0 ? 0 : 
System.currentTimeMillis() - startOfSuspendedEpoch;
    +                long pollMaxMs = useSessionTimeoutMs - elapsedMs;
    --- End diff --
    
    If startOfSuspendedEpoch is 0, the wait is useSessionTimeoutMs. I'm 
thinking that if startOfSuspendedEpoch the max wait should (useSessionTimeoutMs 
/ 2) or something. It seems safer to me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to