Commit 82e685e3 authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

fix the process_worker_message function which must always get the first element from the queue

parent 6abe4b5a
......@@ -296,8 +296,7 @@ ngx_http_push_stream_process_worker_message(void)
ngx_http_push_stream_worker_data_t *thisworker_data = workers_data + ngx_process_slot;
cur = &thisworker_data->messages_queue;
while ((cur = ngx_queue_next(cur)) && (cur != NULL) && (cur != &thisworker_data->messages_queue)) {
while ((cur = ngx_queue_head(&thisworker_data->messages_queue)) && (cur != NULL) && (cur != &thisworker_data->messages_queue)) {
worker_msg = ngx_queue_data(cur, ngx_http_push_stream_worker_msg_t, queue);
if (worker_msg->pid == ngx_pid) {
// everything is okay
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment