fix r3184

This commit is contained in:
Igor Sysoev 2009-10-06 16:08:15 +00:00
parent cf9dd76b43
commit 4efbd6ab36

View File

@ -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;