zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r1366784 - in /zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c
Date Sun, 29 Jul 2012 05:31:16 GMT
Author: phunt
Date: Sun Jul 29 05:31:15 2012
New Revision: 1366784

URL: http://svn.apache.org/viewvc?rev=1366784&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/trunk/CHANGES.txt
    zookeeper/trunk/src/c/src/zookeeper.c

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1366784&r1=1366783&r2=1366784&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Sun Jul 29 05:31:15 2012
@@ -214,6 +214,11 @@ 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-1170. Fix compiler (eclipse) warnings: unused imports,

Modified: zookeeper/trunk/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/c/src/zookeeper.c?rev=1366784&r1=1366783&r2=1366784&view=diff
==============================================================================
--- zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ zookeeper/trunk/src/c/src/zookeeper.c Sun Jul 29 05:31:15 2012
@@ -2228,11 +2228,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