Github user arrodrigues commented on a diff in the pull request: https://github.com/apache/curator/pull/262#discussion_r179010977 --- Diff: curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java --- @@ -253,6 +253,7 @@ private void processEvents() { int lastNegotiatedSessionTimeoutMs = client.getZookeeperClient().getLastNegotiatedSessionTimeoutMs(); int useSessionTimeoutMs = (lastNegotiatedSessionTimeoutMs > 0) ? lastNegotiatedSessionTimeoutMs : sessionTimeoutMs; + useSessionTimeoutMs = sessionExpirationPercent > 0 && startOfSuspendedEpoch != 0 ? (useSessionTimeoutMs * sessionExpirationPercent) / 100 : useSessionTimeoutMs; --- End diff -- I agree that make startOfSuspendedEpoch vollatile would be cleaner, but given that all other points accessing startOfSuspendedEpoch are already synchronized, I think that synchronize also this point would be more consistent with the rest of the code. Just an oppinion.
---