]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MEDIUM] ensure that sock->shutw() also closes read for init states
authorWilly Tarreau <w@1wt.eu>
Sun, 7 Dec 2008 13:04:04 +0000 (14:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 7 Dec 2008 13:04:04 +0000 (14:04 +0100)
Non-connected states will never have a chance to receive a shutr event,
so we need to propagate the shutw across the stream interface.

src/stream_sock.c

index c26e4801c2dc3a6a2f93440edab97137c25ecadf..d4a603c98fcffb1505d7220e2964c0118458bc21 100644 (file)
@@ -485,9 +485,10 @@ void stream_sock_shutw(struct stream_interface *si)
                fd_delete(si->fd);
                /* fall through */
        case SI_ST_CER:
+               si->state = SI_ST_DIS;
+       default:
                si->ib->flags |= BF_SHUTR;
                si->ib->rex = TICK_ETERNITY;
-               si->state = SI_ST_DIS;
                return;
        }
 }