From 32d3ee99eebe296a7addeb311e3e008f66803769 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 29 Dec 2010 14:03:02 +0100 Subject: [PATCH] [CRITICAL] session: correctly leave turn-around and queue states on abort When a client connection aborts while the server-side connection is in turn-around after a failed connection attempt, the turn-around timeout is reset in shutw() but the state is not changed. The session then remains stuck in this state forever. Change the QUE and TAR states to DIS just as we do for CER to fix this. This patch should be backported to 1.4. --- src/stream_interface.c | 2 ++ src/stream_sock.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/stream_interface.c b/src/stream_interface.c index aae602ec5..e93048e8d 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -226,6 +226,8 @@ void stream_int_shutw(struct stream_interface *si) /* fall through */ case SI_ST_CON: case SI_ST_CER: + case SI_ST_QUE: + case SI_ST_TAR: si->state = SI_ST_DIS; /* fall through */ diff --git a/src/stream_sock.c b/src/stream_sock.c index b9b55b740..25573cb6f 100644 --- a/src/stream_sock.c +++ b/src/stream_sock.c @@ -873,6 +873,8 @@ void stream_sock_shutw(struct stream_interface *si) fd_delete(si->fd); /* fall through */ case SI_ST_CER: + case SI_ST_QUE: + case SI_ST_TAR: si->state = SI_ST_DIS; default: si->flags &= ~SI_FL_WAIT_ROOM;