[nginx] Write filter: stored delay in a variable, no functional ...
Roman Arutyunyan
arut at nginx.com
Tue Oct 28 09:35:50 UTC 2014
details: http://hg.nginx.org/nginx/rev/8486205d10db
branches:
changeset: 5884:8486205d10db
user: Roman Arutyunyan <arut at nginx.com>
date: Tue Oct 28 12:29:59 2014 +0300
description:
Write filter: stored delay in a variable, no functional changes.
The code is now similar to ngx_event_pipe_read_upstream().
diffstat:
src/http/ngx_http_write_filter_module.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff -r 973ee2276300 -r 8486205d10db src/http/ngx_http_write_filter_module.c
--- a/src/http/ngx_http_write_filter_module.c Tue Oct 28 12:29:59 2014 +0300
+++ b/src/http/ngx_http_write_filter_module.c Tue Oct 28 12:29:59 2014 +0300
@@ -219,8 +219,8 @@ ngx_http_write_filter(ngx_http_request_t
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;
More information about the nginx-devel
mailing list