diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-10-06 16:08:15 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-10-06 16:08:15 +0000 |
commit | 4efbd6ab364992c32469d51e91da54671f83e5ff (patch) | |
tree | 8586db6f4bbd239775cd83b4932befbbec6d6cf9 /src | |
parent | cf9dd76b43b345dedef2a43b775a0a16f5a2ace7 (diff) | |
download | nginx-4efbd6ab364992c32469d51e91da54671f83e5ff.tar.gz nginx-4efbd6ab364992c32469d51e91da54671f83e5ff.zip |
fix r3184
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_limit_req_module.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c index c9ff20c87..f9b64f1f8 100644 --- a/src/http/modules/ngx_http_limit_req_module.c +++ b/src/http/modules/ngx_http_limit_req_module.c @@ -398,15 +398,15 @@ ngx_http_limit_req_lookup(ngx_http_limit_req_conf_t *lrcf, ngx_uint_t hash, excess = lr->excess - ctx->rate * ngx_abs(ms) / 1000 + 1000; + if (excess < 0) { + excess = 0; + } + if ((ngx_uint_t) excess > lrcf->burst) { *lrp = lr; return NGX_BUSY; } - if (excess < 0) { - excess = 0; - } - lr->excess = excess; lr->last = now; |