From 33014d0d8da6adc8a84ea8ba2ba71a2d409d8e53 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 3 Jun 2007 15:25:37 +0200 Subject: [PATCH] [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. --- src/proto_http.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/proto_http.c b/src/proto_http.c index 8655372d7..0783abbb8 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -2147,12 +2147,7 @@ int process_cli(struct session *t) /* 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 @@ int process_srv(struct session *t) 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); } }