From: Maxim Dounin Date: Mon, 26 Dec 2011 10:49:57 +0000 (+0000) Subject: Fixed throughput problems with large limit_rate. X-Git-Tag: release-1.1.12~6 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=41a77d183c5b5b0b57d042378e01488362406fb7;p=nginx.git Fixed throughput problems with large limit_rate. Previous attempt to fix this was in r1658 (0.6.18), though that one wasn't enough (it was a noop). --- diff --git a/src/http/ngx_http_write_filter_module.c b/src/http/ngx_http_write_filter_module.c index 46351349c..f5dc6c196 100644 --- a/src/http/ngx_http_write_filter_module.c +++ b/src/http/ngx_http_write_filter_module.c @@ -262,7 +262,7 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) } } - delay = (ngx_msec_t) ((nsent - sent) * 1000 / r->limit_rate + 1); + delay = (ngx_msec_t) ((nsent - sent) * 1000 / r->limit_rate); if (delay > 0) { c->write->delayed = 1;