[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.
This commit is contained in:
Willy Tarreau 2010-12-29 14:03:02 +01:00
parent ed2fd2daea
commit 32d3ee99ee
2 changed files with 4 additions and 0 deletions

View File

@ -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 */

View File

@ -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;