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

    https://github.com/apache/curator/pull/157#discussion_r66905910
  
    --- 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 --
    
    What do you mean if there isn't a suspended state? Shouldn't we go into a 
suspended state as soon as the connection is dropped? Then, we will wait up to 
session timeout for an event of any type. If we don't get one, then we assume 
the session is lost and inject a LOST event.


---
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