zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r1366785 - in /zookeeper/branches/branch-3.4: CHANGES.txt src/c/src/zookeeper.c
Date Sun, 29 Jul 2012 05:32:17 GMT
Author: phunt
Date: Sun Jul 29 05:32:17 2012
New Revision: 1366785

URL: http://svn.apache.org/viewvc?rev=1366785&view=rev
Log:
ZOOKEEPER-1493. C Client: zookeeper_process doesn't invoke completion callback if zookeeper_close
has been called (Michi Mutsuzaki via phunt and mahadev)

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=1366785&r1=1366784&r2=1366785&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.4/CHANGES.txt Sun Jul 29 05:32:17 2012
@@ -85,6 +85,10 @@ BUGFIXES:
   ZOOKEEPER-1521. LearnerHandler initLimit/syncLimit problems
     specifying follower socket timeout limits (phunt)
 
+  ZOOKEEPER-1493. C Client: zookeeper_process doesn't invoke
+    completion callback if zookeeper_close has been called
+    (Michi Mutsuzaki via phunt and mahadev)
+
 IMPROVEMENTS:
 
   ZOOKEEPER-1389. it would be nice if start-foreground used exec $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=1366785&r1=1366784&r2=1366785&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/c/src/zookeeper.c (original)
+++ zookeeper/branches/branch-3.4/src/c/src/zookeeper.c Sun Jul 29 05:32:17 2012
@@ -2224,11 +2224,8 @@ int zookeeper_process(zhandle_t *zh, int
             completion_list_t *cptr = dequeue_completion(&zh->sent_requests);
 
             /* [ZOOKEEPER-804] Don't assert if zookeeper_close has been called. */
-            if (zh->close_requested == 1) {
-                if (cptr) {
-                    destroy_completion_entry(cptr);
-                    cptr = NULL;
-                }
+            if (zh->close_requested == 1 && cptr == NULL) {
+                LOG_DEBUG(("Completion queue has been cleared by zookeeper_close()"));
                 close_buffer_iarchive(&ia);
                 return api_epilog(zh,ZINVALIDSTATE);
             }



Mime
View raw message