mirror of
https://github.com/nginx/nginx.git
synced 2026-09-01 02:58:40 +00:00
Cache: added ngx_quit check to ngx_http_file_cache_expire().
While managing big caches it is possible that expiring old cache items in ngx_http_file_cache_expire() will take a while. Added a check for ngx_quit / ngx_terminate to make sure cache manager can be terminated while in ngx_http_file_cache_expire().
This commit is contained in:
parent
1efe4fa7f7
commit
17dad56e4e
1 changed files with 5 additions and 0 deletions
|
|
@ -1313,6 +1313,11 @@ ngx_http_file_cache_expire(ngx_http_file_cache_t *cache)
|
|||
|
||||
for ( ;; ) {
|
||||
|
||||
if (ngx_quit || ngx_terminate) {
|
||||
wait = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (ngx_queue_empty(&cache->sh->queue)) {
|
||||
wait = 10;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue