diff --git a/src/mux_pt.c b/src/mux_pt.c index 86a1f2362..4895c1780 100644 --- a/src/mux_pt.c +++ b/src/mux_pt.c @@ -557,6 +557,8 @@ static size_t mux_pt_snd_buf(struct stconn *sc, struct buffer *buf, size_t count b_del(buf, ret); if (conn->flags & CO_FL_ERROR) { + if (conn_xprt_read0_pending(conn)) + se_fl_set(ctx->sd, SE_FL_EOS); se_fl_set_error(ctx->sd); TRACE_DEVEL("error on connection", PT_EV_TX_DATA|PT_EV_CONN_ERR, conn, sc); } @@ -625,6 +627,8 @@ static int mux_pt_snd_pipe(struct stconn *sc, struct pipe *pipe) ret = conn->xprt->snd_pipe(conn, conn->xprt_ctx, pipe); if (conn->flags & CO_FL_ERROR) { + if (conn_xprt_read0_pending(conn)) + se_fl_set(ctx->sd, SE_FL_EOS); se_fl_set_error(ctx->sd); TRACE_DEVEL("error on connection", PT_EV_TX_DATA|PT_EV_CONN_ERR, conn, sc); }