From fbb262533f8fec6dd2e05f9954225f3077391291 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 24 May 2010 07:43:39 +0000 Subject: fix delay in limit_req --- src/http/modules/ngx_http_limit_req_module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/http') 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; } -- cgit