aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_write_filter_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_write_filter_module.c b/src/http/ngx_http_write_filter_module.c
index 83cb1fa1e..b19f75bda 100644
--- a/src/http/ngx_http_write_filter_module.c
+++ b/src/http/ngx_http_write_filter_module.c
@@ -219,8 +219,8 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
if (limit <= 0) {
c->write->delayed = 1;
- ngx_add_timer(c->write,
- (ngx_msec_t) (- limit * 1000 / r->limit_rate + 1));
+ delay = (ngx_msec_t) (- limit * 1000 / r->limit_rate + 1);
+ ngx_add_timer(c->write, delay);
c->buffered |= NGX_HTTP_WRITE_BUFFERED;