FS-10453 [kazoo] fix dropped messages

This commit is contained in:
lazedo 2017-06-30 12:38:32 +01:00 committed by Mike Jerris
parent b11bdd0016
commit af764d21bc
1 changed files with 2 additions and 2 deletions

View File

@ -1312,8 +1312,8 @@ static void *SWITCH_THREAD_FUNC handle_node(switch_thread_t *thread, void *obj)
}
}
while (switch_queue_trypop(ei_node->send_msgs, &pop) == SWITCH_STATUS_SUCCESS
&& ++send_msg_count <= kazoo_globals.send_msg_batch) {
while (++send_msg_count <= kazoo_globals.send_msg_batch
&& switch_queue_trypop(ei_node->send_msgs, &pop) == SWITCH_STATUS_SUCCESS) {
ei_send_msg_t *send_msg = (ei_send_msg_t *) pop;
ei_helper_send(ei_node, &send_msg->pid, &send_msg->buf);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Sent erlang message to %s <%d.%d.%d>\n"