mirror of
https://github.com/nginx/nginx.git
synced 2026-08-27 04:07:18 +00:00
Win32: fixed cpu hog by cache manager on exit (ticket #514).
The "ngx_quit" may be reset by the worker thread before it's seen by a ngx_cache_manager_thread(), resulting in an infinite loop. Make sure to test ngx_exiting as well.
This commit is contained in:
parent
e042fc9038
commit
8f6958baa9
1 changed files with 3 additions and 3 deletions
|
|
@ -926,7 +926,7 @@ ngx_cache_manager_thread(void *data)
|
|||
* ev == WAIT_ABANDONED_0 + 1
|
||||
*/
|
||||
|
||||
if (ngx_terminate || ngx_quit) {
|
||||
if (ngx_terminate || ngx_quit || ngx_exiting) {
|
||||
ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -936,7 +936,7 @@ ngx_cache_manager_thread(void *data)
|
|||
|
||||
for ( ;; ) {
|
||||
|
||||
if (ngx_terminate || ngx_quit) {
|
||||
if (ngx_terminate || ngx_quit || ngx_exiting) {
|
||||
ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
|
||||
break;
|
||||
}
|
||||
|
|
@ -1005,7 +1005,7 @@ ngx_cache_loader_thread(void *data)
|
|||
path = cycle->paths.elts;
|
||||
for (i = 0; i < cycle->paths.nelts; i++) {
|
||||
|
||||
if (ngx_terminate || ngx_quit) {
|
||||
if (ngx_terminate || ngx_quit || ngx_exiting) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue