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.
diff --git a/src/mux_pt.c b/src/mux_pt.c
index b9ad8dc..3e2d066 100644
--- a/src/mux_pt.c
+++ b/src/mux_pt.c
@@ -247,6 +247,8 @@
if (conn_xprt_ready(cs->conn) && cs->conn->xprt->shutr)
cs->conn->xprt->shutr(cs->conn, cs->conn->xprt_ctx,
(mode == CS_SHR_DRAIN));
+ else if (mode == CS_SHR_DRAIN)
+ conn_sock_drain(cs->conn);
if (cs->flags & CS_FL_SHW)
conn_full_close(cs->conn);
}