]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] do not re-arm read timeout in SHUTR state !
authorWilly Tarreau <w@1wt.eu>
Sun, 3 Jun 2007 13:25:37 +0000 (15:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 3 Jun 2007 14:03:45 +0000 (16:03 +0200)
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

index 8655372d725a25ec4a46609db8f5b112a1f9a819..0783abbb8f325265ad302d3fea42183cbc0cfdd0 100644 (file)
@@ -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);
                        }
                }