aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2014-10-28 12:29:59 +0300
committerRoman Arutyunyan <arut@nginx.com>2014-10-28 12:29:59 +0300
commitcf1e4781a9c0efd2c057096191ece4c79d3a0edd (patch)
treee84b9ae5bb3180995da82c2c0c97c0863f22512b /src
parent18e4d042b04e1ec09d1b74537541b3bb99a75c3f (diff)
downloadnginx-cf1e4781a9c0efd2c057096191ece4c79d3a0edd.tar.gz
nginx-cf1e4781a9c0efd2c057096191ece4c79d3a0edd.zip
Write filter: stored delay in a variable, no functional changes.
The code is now similar to ngx_event_pipe_read_upstream().
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;