Commit 0144420e authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

decrementing counter inside locked area

parent 6796034c
...@@ -93,9 +93,9 @@ ngx_http_push_stream_delete_unrecoverable_channels(ngx_http_push_stream_shm_data ...@@ -93,9 +93,9 @@ ngx_http_push_stream_delete_unrecoverable_channels(ngx_http_push_stream_shm_data
cur_subscription = &subscriber->subscriptions_sentinel; cur_subscription = &subscriber->subscriptions_sentinel;
while ((cur_subscription = (ngx_http_push_stream_subscription_t *) ngx_queue_next(&cur_subscription->queue)) != &subscriber->subscriptions_sentinel) { while ((cur_subscription = (ngx_http_push_stream_subscription_t *) ngx_queue_next(&cur_subscription->queue)) != &subscriber->subscriptions_sentinel) {
if (cur_subscription->channel == channel) { if (cur_subscription->channel == channel) {
NGX_HTTP_PUSH_STREAM_DECREMENT_COUNTER(channel->subscribers);
ngx_shmtx_lock(&shpool->mutex); ngx_shmtx_lock(&shpool->mutex);
NGX_HTTP_PUSH_STREAM_DECREMENT_COUNTER(channel->subscribers);
// remove the reference from subscription for channel // remove the reference from subscription for channel
ngx_queue_remove(&cur_subscription->queue); ngx_queue_remove(&cur_subscription->queue);
// remove the reference from channel for subscriber // remove the reference from channel for subscriber
......
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