mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-18 09:24:31 +00:00
MINOR: mux-h1: Process next request for IDLE connection only
When the conn-stream is detached for a H1 connection, there is no reason to subscribe for reads or process pending input data if the connection is not idle. Because, it means a shutdown is pending.
This commit is contained in:
parent
adcd789d92
commit
5d3c93cd43
@ -2538,11 +2538,15 @@ static void h1_detach(struct conn_stream *cs)
|
|||||||
h1_release(h1c);
|
h1_release(h1c);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* If we have a new request, process it immediately */
|
if (h1c->flags & H1C_F_CS_IDLE) {
|
||||||
|
/* If we have a new request, process it immediately or
|
||||||
|
* subscribe for reads waiting for new data
|
||||||
|
*/
|
||||||
if (unlikely(b_data(&h1c->ibuf)))
|
if (unlikely(b_data(&h1c->ibuf)))
|
||||||
h1_process(h1c);
|
h1_process(h1c);
|
||||||
else
|
else
|
||||||
h1c->conn->xprt->subscribe(h1c->conn, h1c->conn->xprt_ctx, SUB_RETRY_RECV, &h1c->wait_event);
|
h1c->conn->xprt->subscribe(h1c->conn, h1c->conn->xprt_ctx, SUB_RETRY_RECV, &h1c->wait_event);
|
||||||
|
}
|
||||||
h1_refresh_timeout(h1c);
|
h1_refresh_timeout(h1c);
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
|
Loading…
Reference in New Issue
Block a user