mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-18 09:24:31 +00:00
MINOR: mux-pt: take care of CS_SHR_DRAIN in shutr()
When the shutr() requests CS_SHR_DRAIN and there's no particular shutr implemented on the underlying transport layer, we must drain pending data. This is what happens when cs_drain_and_close() is called. It is important for TCP checks to drain large responses and close cleanly.
This commit is contained in:
parent
6aee5b9a4c
commit
7d7b11cf93
@ -247,6 +247,8 @@ static void mux_pt_shutr(struct conn_stream *cs, enum cs_shr_mode mode)
|
|||||||
if (conn_xprt_ready(cs->conn) && cs->conn->xprt->shutr)
|
if (conn_xprt_ready(cs->conn) && cs->conn->xprt->shutr)
|
||||||
cs->conn->xprt->shutr(cs->conn, cs->conn->xprt_ctx,
|
cs->conn->xprt->shutr(cs->conn, cs->conn->xprt_ctx,
|
||||||
(mode == CS_SHR_DRAIN));
|
(mode == CS_SHR_DRAIN));
|
||||||
|
else if (mode == CS_SHR_DRAIN)
|
||||||
|
conn_sock_drain(cs->conn);
|
||||||
if (cs->flags & CS_FL_SHW)
|
if (cs->flags & CS_FL_SHW)
|
||||||
conn_full_close(cs->conn);
|
conn_full_close(cs->conn);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user