changeset 4383:5130c16a130e

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).
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 26 Dec 2011 10:49:57 +0000
parents b4d54fa76853
children a8b6d5dee539
files src/http/ngx_http_write_filter_module.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
             }
         }
 
-        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;