Commit 41a75a1b authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

fix worker init and exit code to run only on process SINGLE or WORKER, to be...

fix worker init and exit code to run only on process SINGLE or WORKER, to be possible use the module and proxy cache on the same nginx
parent 5fbd0745
......@@ -228,6 +228,10 @@ ngx_http_push_stream_init_worker(ngx_cycle_t *cycle)
return NGX_OK;
}
if ((ngx_process != NGX_PROCESS_SINGLE) && (ngx_process != NGX_PROCESS_WORKER)) {
return NGX_OK;
}
if ((ngx_http_push_stream_ipc_init_worker()) != NGX_OK) {
return NGX_ERROR;
}
......@@ -266,6 +270,10 @@ ngx_http_push_stream_exit_worker(ngx_cycle_t *cycle)
return;
}
if ((ngx_process != NGX_PROCESS_SINGLE) && (ngx_process != NGX_PROCESS_WORKER)) {
return;
}
// disconnect all subscribers (force_disconnect = 1)
ngx_http_push_stream_disconnect_worker_subscribers(1);
ngx_http_push_stream_clean_worker_data();
......
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