[BUG] do not re-arm read timeout in SHUTR state !
There is a long-time bug causing busy loops when either client-side
or server-side enters a SHUTR state. When writing data to the FD,
it was possible to re-arm the read side if the write had been paused.
diff --git a/src/proto_http.c b/src/proto_http.c
index 8655372..0783abb 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -2147,12 +2147,7 @@
/* buffer not empty */
if (EV_FD_COND_S(t->cli_fd, DIR_WR)) {
/* restart writing */
- if (tv_add_ifset(&rep->wex, &now, &t->fe->clitimeout)) {
- /* FIXME: to prevent the client from expiring read timeouts during writes,
- * we refresh it. */
- req->rex = rep->wex;
- }
- else
+ if (!tv_add_ifset(&rep->wex, &now, &t->fe->clitimeout))
tv_eternity(&rep->wex);
}
}
@@ -3183,12 +3178,7 @@
else { /* buffer not empty */
if (EV_FD_COND_S(t->srv_fd, DIR_WR)) {
/* restart writing */
- if (tv_add_ifset(&req->wex, &now, &t->be->srvtimeout)) {
- /* FIXME: to prevent the server from expiring read timeouts during writes,
- * we refresh it. */
- rep->rex = req->wex;
- }
- else
+ if (!tv_add_ifset(&req->wex, &now, &t->be->srvtimeout))
tv_eternity(&req->wex);
}
}