mirror of
https://github.com/nginx/nginx.git
synced 2024-12-02 11:49:01 +08:00
Write filter: stored delay in a variable, no functional changes.
The code is now similar to ngx_event_pipe_read_upstream().
This commit is contained in:
parent
18e4d042b0
commit
cf1e4781a9
@ -219,8 +219,8 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
|
|
||||||
if (limit <= 0) {
|
if (limit <= 0) {
|
||||||
c->write->delayed = 1;
|
c->write->delayed = 1;
|
||||||
ngx_add_timer(c->write,
|
delay = (ngx_msec_t) (- limit * 1000 / r->limit_rate + 1);
|
||||||
(ngx_msec_t) (- limit * 1000 / r->limit_rate + 1));
|
ngx_add_timer(c->write, delay);
|
||||||
|
|
||||||
c->buffered |= NGX_HTTP_WRITE_BUFFERED;
|
c->buffered |= NGX_HTTP_WRITE_BUFFERED;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user