From: Igor Sysoev Date: Mon, 24 May 2010 07:43:39 +0000 (+0000) Subject: fix delay in limit_req X-Git-Tag: release-0.8.38~3 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=fbb262533f8fec6dd2e05f9954225f3077391291;p=nginx.git fix delay in limit_req --- 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; }