kezhuw commented on code in PR #1847:
URL: https://github.com/apache/zookeeper/pull/1847#discussion_r1195423188
##########
zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java:
##########
@@ -1192,7 +1192,6 @@ public void run() {
startConnect(serverAddress);
// Update now to start the connection timer right
after we make a connection attempt
clientCnxnSocket.updateNow();
- clientCnxnSocket.updateLastSendAndHeard();
Review Comment:
Semantically, it is because we are not heard(`lastHeard`) anything here and
there. If we update `lastHeard` in these two places, then `getIdleRecv` will be
reset to 0 in every re-connect which will cause no `SessionTimeoutException`.
For `lastSend`, I think it does not matter as it is only used for `ping` in
`CONNECTED` state after successful `ConnectRequest` which will
`updateLastSend`. I don't see a reason for `updateLastSend` in these two place.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]