You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/09/16 12:12:41 UTC

[GitHub] [zookeeper] ztzg commented on a change in pull request #1457: ZOOKEEPER-3937: C client: avoid out-of-order packets during SASL negotiation

ztzg commented on a change in pull request #1457:
URL: https://github.com/apache/zookeeper/pull/1457#discussion_r489387899



##########
File path: zookeeper-client/zookeeper-client-c/src/zookeeper.c
##########
@@ -2812,6 +2844,11 @@ static void finalize_session_establishment(zhandle_t *zh) {
     LOG_DEBUG(LOGCALLBACK(zh), "Calling a watcher for a ZOO_SESSION_EVENT and the state=ZOO_CONNECTED_STATE");
     zh->input_buffer = 0; // just in case the watcher calls zookeeper_process() again
     PROCESS_SESSION_EVENT(zh, zh->state);
+
+    if (zh->sasl_client) {
+        /* some packets might have been delayed during SASL negotiaton. */
+        adaptor_send_queue(zh, 0);
+    }

Review comment:
       This did not show up during testing, but I have added it in my last push: as far as I can tell, nothing guarantees delayed packets will be flushed before the next ping without it.
   
   (Cc: @eolivelli)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org