anmolnar commented on code in PR #2058: URL: https://github.com/apache/zookeeper/pull/2058#discussion_r1769276442
########## zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java: ########## @@ -1274,7 +1295,6 @@ private void cleanAndNotifyState() { eventThread.queueEvent(new WatchedEvent(Event.EventType.None, Event.KeeperState.Disconnected, null)); } clientCnxnSocket.updateNow(); - clientCnxnSocket.updateLastSendAndHeard(); Review Comment: Why have you removed this? ########## zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java: ########## @@ -1184,13 +1192,21 @@ public void run() { to = connectTimeout - clientCnxnSocket.getIdleRecv(); } - if (to <= 0) { + int expiration = expirationTimeout - clientCnxnSocket.getIdleRecv(); + if (expiration <= 0) { String warnInfo = String.format( "Client session timed out, have not heard from server in %dms for session id 0x%s", clientCnxnSocket.getIdleRecv(), Long.toHexString(sessionId)); LOG.warn(warnInfo); + changeZkState(States.CLOSED); Review Comment: Why have you added this here? -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org