<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="margin:0;">Hello!</div><div style="margin:0;"><br></div><div style="margin:0;"><div style="margin:0;"># HG changeset patch</div><div style="margin:0;"># User Jiuzhou Cui <cuijiuzhou@alibaba-inc.com></div><div style="margin:0;"># Date 1703645578 -28800</div><div style="margin:0;">#      Wed Dec 27 10:52:58 2023 +0800</div><div style="margin:0;"># Node ID 474ae07e47272e435d81c0ca9e4867aae35c30ab</div><div style="margin:0;"># Parent  ee40e2b1d0833b46128a357fbc84c6e23be9be07</div><div style="margin:0;">Don't delete timer of write event when it's delayed.</div><div style="margin:0;"><br></div><div style="margin:0;">This will make download speed alway zero when limit_rate in body filter.</div><div style="margin:0;"><br></div><div style="margin:0;">diff -r ee40e2b1d083 -r 474ae07e4727 src/http/ngx_http_upstream.c</div><div style="margin:0;">--- a/src/http/ngx_http_upstream.c      Mon Dec 25 21:15:48 2023 +0400</div><div style="margin:0;">+++ b/src/http/ngx_http_upstream.c      Wed Dec 27 10:52:58 2023 +0800</div><div style="margin:0;">@@ -3787,11 +3787,13 @@</div><div style="margin:0;">         }</div><div style="margin:0;">     }</div><div style="margin:0;"><br></div><div style="margin:0;">-    if (downstream->write->active && !downstream->write->ready) {</div><div style="margin:0;">-        ngx_add_timer(downstream->write, clcf->send_timeout);</div><div style="margin:0;">-</div><div style="margin:0;">-    } else if (downstream->write->timer_set) {</div><div style="margin:0;">-        ngx_del_timer(downstream->write);</div><div style="margin:0;">+    if (!downstream->write->delayed) {</div><div style="margin:0;">+        if (downstream->write->active && !downstream->write->ready) {</div><div style="margin:0;">+            ngx_add_timer(downstream->write, clcf->send_timeout);</div><div style="margin:0;">+</div><div style="margin:0;">+        } else if (downstream->write->timer_set) {</div><div style="margin:0;">+            ngx_del_timer(downstream->write);</div><div style="margin:0;">+        }</div><div style="margin:0;">     }</div><div style="margin:0;"><br></div><div style="margin:0;">     if (upstream->read->eof || upstream->read->error) {</div></div></div>