diff --git a/include/haproxy/connection.h b/include/haproxy/connection.h index c42ca17e6..7cc852fd1 100644 --- a/include/haproxy/connection.h +++ b/include/haproxy/connection.h @@ -249,6 +249,8 @@ static inline void conn_xprt_shutw_hard(struct connection *c) /* shut read */ static inline void cs_shutr(struct conn_stream *cs, enum cs_shr_mode mode) { + if (cs->flags & CS_FL_SHR) + return; /* clean data-layer shutdown */ if (cs->conn->mux && cs->conn->mux->shutr) @@ -259,6 +261,8 @@ static inline void cs_shutr(struct conn_stream *cs, enum cs_shr_mode mode) /* shut write */ static inline void cs_shutw(struct conn_stream *cs, enum cs_shw_mode mode) { + if (cs->flags & CS_FL_SHW) + return; /* clean data-layer shutdown */ if (cs->conn->mux && cs->conn->mux->shutw)