wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

an question about ngx_http_push_stream_init_ipc #211

Closed stone-wind closed 8 years ago

stone-wind commented 8 years ago

Hi ,I am looking the codes, just get a question in the file:ngx_http_push_stream_module_setup.c: 297-299 lines: if ((rc = ngx_http_push_stream_init_ipc(cycle, ccf->worker_processes)) == NGX_OK) { ngx_http_push_stream_alert_shutting_down_workers(); }

I can't understand the logic: it had just inited success and then destroy it? shoud it be like below:

if ((rc = ngx_http_push_stream_init_ipc(cycle, ccf->worker_processes)) != NGX_OK) { ngx_http_push_stream_alert_shutting_down_workers(); }

or why does it close channels like that? Thanks a lot.