diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-05-24 07:43:39 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-05-24 07:43:39 +0000 |
commit | fbb262533f8fec6dd2e05f9954225f3077391291 (patch) | |
tree | 8cb9e24ced3434cdde0d994582d21d9034955990 /src | |
parent | 1a26a18f641f92712f7716b8acbd0d1e73a057ff (diff) | |
download | nginx-fbb262533f8fec6dd2e05f9954225f3077391291.tar.gz nginx-fbb262533f8fec6dd2e05f9954225f3077391291.zip |
fix delay in limit_req
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_limit_req_module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c index f9b64f1f8..38711aa82 100644 --- a/src/http/modules/ngx_http_limit_req_module.c +++ b/src/http/modules/ngx_http_limit_req_module.c @@ -229,7 +229,8 @@ ngx_http_limit_req_handler(ngx_http_request_t *r) r->read_event_handler = ngx_http_test_reading; r->write_event_handler = ngx_http_limit_req_delay; - ngx_add_timer(r->connection->write, (ngx_msec_t) excess); + ngx_add_timer(r->connection->write, + (ngx_msec_t) excess * 1000 / ctx->rate); return NGX_AGAIN; } |