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).
This commit is contained in:
Maxim Dounin 2011-12-26 10:49:57 +00:00
parent b59d1cbb0d
commit 812f376092

View file

@ -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;