From: Willy Tarreau Date: Sun, 7 Dec 2008 13:04:04 +0000 (+0100) Subject: [MEDIUM] ensure that sock->shutw() also closes read for init states X-Git-Tag: v1.3.16-rc1~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f0065141913b0fdf3a99143e2c545f2e44d5cf4;p=thirdparty%2Fhaproxy.git [MEDIUM] ensure that sock->shutw() also closes read for init states Non-connected states will never have a chance to receive a shutr event, so we need to propagate the shutw across the stream interface. --- diff --git a/src/stream_sock.c b/src/stream_sock.c index c26e4801c2..d4a603c98f 100644 --- a/src/stream_sock.c +++ b/src/stream_sock.c @@ -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; } }