Mercurial > hg > nginx-quic
comparison src/http/ngx_http_write_filter_module.c @ 8678:61d0fa67b55e quic
Merged with the default branch.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 03 Nov 2021 11:22:07 +0300 |
parents | 94daa42ff5ce 51a260276425 |
children | ce6d9cf0f567 |
comparison
equal
deleted
inserted
replaced
8650:6d1488b62dc5 | 8678:61d0fa67b55e |
---|---|
323 } | 323 } |
324 | 324 |
325 delay = (ngx_msec_t) ((nsent - sent) * 1000 / r->limit_rate); | 325 delay = (ngx_msec_t) ((nsent - sent) * 1000 / r->limit_rate); |
326 | 326 |
327 if (delay > 0) { | 327 if (delay > 0) { |
328 limit = 0; | |
329 c->write->delayed = 1; | 328 c->write->delayed = 1; |
330 ngx_add_timer(c->write, delay); | 329 ngx_add_timer(c->write, delay); |
331 } | 330 } |
332 } | 331 } |
333 | 332 |
334 if (limit | 333 if (chain && c->write->ready && !c->write->delayed) { |
335 && c->write->ready | 334 ngx_post_event(c->write, &ngx_posted_next_events); |
336 && c->sent - sent >= limit - (off_t) (2 * ngx_pagesize)) | |
337 { | |
338 c->write->delayed = 1; | |
339 ngx_add_timer(c->write, 1); | |
340 } | 335 } |
341 | 336 |
342 for (cl = r->out; cl && cl != chain; /* void */) { | 337 for (cl = r->out; cl && cl != chain; /* void */) { |
343 ln = cl; | 338 ln = cl; |
344 cl = cl->next; | 339 cl = cl->next; |