]> git.kaiwu.me - nginx.git/commitdiff
change logic slightly
authorIgor Sysoev <igor@sysoev.ru>
Mon, 2 Aug 2010 12:34:15 +0000 (12:34 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 2 Aug 2010 12:34:15 +0000 (12:34 +0000)
src/http/ngx_http_file_cache.c

index 95260d44450920ed2e6cd561ad92f656d2503b8f..6fc823c6d20cbb498e816ab47c841208eb79a2c7 100644 (file)
@@ -1007,7 +1007,7 @@ ngx_http_file_cache_forced_expire(ngx_http_file_cache_t *cache)
     ngx_memcpy(name, path->name.data, path->name.len);
 
     wait = 10;
-    tries = 0;
+    tries = 20;
 
     ngx_shmtx_lock(&cache->shpool->mutex);
 
@@ -1026,7 +1026,7 @@ ngx_http_file_cache_forced_expire(ngx_http_file_cache_t *cache)
             ngx_http_file_cache_delete(cache, q, name);
 
         } else {
-            if (tries++ < 20) {
+            if (--tries) {
                 continue;
             }