]> git.kaiwu.me - haproxy.git/commitdiff
[BUG] fix wrong timeout computation in event_accept()
authorWilly Tarreau <w@1wt.eu>
Mon, 15 Oct 2007 18:36:37 +0000 (20:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Oct 2007 12:49:52 +0000 (14:49 +0200)
In case the incoming socket is set for write and not for read (very
unlikely, except in HEALTH mode), the timeout may remain eternity due
to a copy-paste typo.

src/client.c

index 1f58154c2f4eb42868850b245cffc80be1e46588..b4efc9f490060279cc7e7dbd4a2c0d6641567d0c 100644 (file)
@@ -430,7 +430,7 @@ int event_accept(int fd) {
                        }
                        if (EV_FD_ISSET(cfd, DIR_WR)) {
                                tv_add(&s->rep->wex, &now, &s->fe->clitimeout);
-                               t->expire = s->req->rex;
+                               t->expire = s->rep->wex;
                        }
                }