zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mic...@apache.org
Subject svn commit: r1551367 - in /zookeeper/branches/branch-3.4: CHANGES.txt src/c/src/zookeeper.c
Date Mon, 16 Dec 2013 21:49:50 GMT
Author: michim
Date: Mon Dec 16 21:49:50 2013
New Revision: 1551367

URL: http://svn.apache.org/r1551367
Log:
ZOOKEEPER-1756. zookeeper_interest() in C client can return a timeval of 0 (Eric Lindvall
via michim)

Modified:
    zookeeper/branches/branch-3.4/CHANGES.txt
    zookeeper/branches/branch-3.4/src/c/src/zookeeper.c

Modified: zookeeper/branches/branch-3.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/CHANGES.txt?rev=1551367&r1=1551366&r2=1551367&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.4/CHANGES.txt Mon Dec 16 21:49:50 2013
@@ -191,6 +191,9 @@ BUGFIXES:
   ZOOKEEPER-1622. session ids will be negative in the year 2022
   (Eric Newton via phunt)
 
+  ZOOKEEPER-1756. zookeeper_interest() in C client can return a timeval of 0
+  (Eric Lindvall via michim)
+
 IMPROVEMENTS:
 
   ZOOKEEPER-1564. Allow JUnit test build with IBM Java

Modified: zookeeper/branches/branch-3.4/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/c/src/zookeeper.c?rev=1551367&r1=1551366&r2=1551367&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/c/src/zookeeper.c (original)
+++ zookeeper/branches/branch-3.4/src/c/src/zookeeper.c Mon Dec 16 21:49:50 2013
@@ -1650,13 +1650,15 @@ int zookeeper_interest(zhandle_t *zh, in
         // 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;
             }



Mime
View raw message