diff --git a/include/haproxy/channel.h b/include/haproxy/channel.h index 1bf21c7a7..44728bbf6 100644 --- a/include/haproxy/channel.h +++ b/include/haproxy/channel.h @@ -565,6 +565,7 @@ static inline void channel_abort(struct channel *chn) { chn_prod(chn)->flags |= SC_FL_SHUTR_NOW; chn_cons(chn)->flags |= SC_FL_SHUTW_NOW; + chn->flags |= CF_AUTO_CLOSE; chn->flags &= ~CF_AUTO_CONNECT; } diff --git a/src/hlua.c b/src/hlua.c index 6bbf5c97a..913b237c9 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -8158,7 +8158,6 @@ __LJMP static int hlua_txn_done(lua_State *L) channel_auto_read(req); channel_abort(req); - channel_auto_close(req); channel_erase(req); channel_auto_read(res); diff --git a/src/http_ana.c b/src/http_ana.c index bee658f86..4dc1b523f 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -4446,7 +4446,6 @@ int http_forward_proxy_resp(struct stream *s, int final) channel_auto_read(req); channel_abort(req); - channel_auto_close(req); channel_htx_erase(req, htxbuf(&req->buf)); channel_auto_read(res); @@ -4511,7 +4510,6 @@ void http_reply_and_close(struct stream *s, short status, struct http_reply *msg channel_auto_read(&s->req); channel_abort(&s->req); - channel_auto_close(&s->req); channel_htx_erase(&s->req, htxbuf(&s->req.buf)); channel_auto_read(&s->res); channel_auto_close(&s->res); diff --git a/src/stream.c b/src/stream.c index f8fc06203..5afef6c8f 100644 --- a/src/stream.c +++ b/src/stream.c @@ -846,7 +846,6 @@ void stream_retnclose(struct stream *s, const struct buffer *msg) channel_auto_read(ic); channel_abort(ic); - channel_auto_close(ic); channel_erase(ic); channel_truncate(oc);