Created
September 8, 2013 04:51
-
-
Save eric/6481934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ur zkc-3.4.5-orig/c/src/zookeeper.c zkc-3.4.5/c/src/zookeeper.c | |
--- zkc-3.4.5-orig/c/src/zookeeper.c 2012-09-30 10:53:32.000000000 -0700 | |
+++ zkc-3.4.5/c/src/zookeeper.c 2013-09-07 21:25:24.000000000 -0700 | |
@@ -1650,14 +1650,16 @@ | |
// a PING | |
if (zh->state==ZOO_CONNECTED_STATE) { | |
send_to = zh->recv_timeout/3 - idle_send; | |
- if (send_to <= 0 && zh->sent_requests.head==0) { | |
-// LOG_DEBUG(("Sending PING to %s (exceeded idle by %dms)", | |
-// format_current_endpoint_info(zh),-send_to)); | |
- int rc=send_ping(zh); | |
- if (rc < 0){ | |
- LOG_ERROR(("failed to send PING request (zk retcode=%d)",rc)); | |
- return api_epilog(zh,rc); | |
- } | |
+ if (send_to <= 0) { | |
+ if (zh->sent_requests.head==0) { | |
+ LOG_DEBUG(("Sending PING to %s (exceeded idle by %dms)", | |
+ format_current_endpoint_info(zh),-send_to)); | |
+ int rc=send_ping(zh); | |
+ if (rc < 0){ | |
+ LOG_ERROR(("failed to send PING request (zk retcode=%d)",rc)); | |
+ return api_epilog(zh,rc); | |
+ } | |
+ } | |
send_to = zh->recv_timeout/3; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment