# HG changeset patch # User Igor Sysoev # Date 1274687019 0 # Node ID eb156d98a9faab0b95a03b1f40f6b111faca9a97 # Parent ca24774c16e35a8f13b763c0f8fb8c5fd2698daa 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 --- 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_requ 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; }