mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
[BUG] switch server-side stream interface to close in case of abort
In pure TCP mode, there is no response analyser to switch the server-side stream interface from INI to CLO when the output has been closed after an abort. This caused sessions to remain indefinitely active when they were aborted by the client during a TCP content analysis. The proper action is to switch the stream interface to the CLO state from INI when we have write enable and shutdown write.
This commit is contained in:
parent
79584225e5
commit
9279562e2a
@ -817,10 +817,15 @@ void process_session(struct task *t, int *next)
|
||||
if (unlikely((s->req->flags & (BF_SHUTR|BF_SHUTR_NOW)) == BF_SHUTR_NOW))
|
||||
s->req->prod->shutr(s->req->prod);
|
||||
|
||||
/* it's possible that an upper layer has requested a connection setup */
|
||||
/* it's possible that an upper layer has requested a connection setup or abort */
|
||||
if (s->req->cons->state == SI_ST_INI &&
|
||||
(s->req->flags & (BF_WRITE_ENA|BF_SHUTW|BF_SHUTW_NOW)) == BF_WRITE_ENA)
|
||||
s->req->cons->state = SI_ST_REQ;
|
||||
(s->req->flags & (BF_WRITE_ENA|BF_SHUTW|BF_SHUTW_NOW))) {
|
||||
if ((s->req->flags & (BF_WRITE_ENA|BF_SHUTW|BF_SHUTW_NOW)) == BF_WRITE_ENA)
|
||||
s->req->cons->state = SI_ST_REQ; /* new connection requested */
|
||||
else
|
||||
s->req->cons->state = SI_ST_CLO; /* shutw+ini = abort */
|
||||
}
|
||||
|
||||
|
||||
/* we may have a pending connection request, or a connection waiting
|
||||
* for completion.
|
||||
|
Loading…
Reference in New Issue
Block a user