diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h index 95cf47a01..0c83759da 100644 --- a/include/types/stream_interface.h +++ b/include/types/stream_interface.h @@ -74,6 +74,7 @@ enum { SI_FL_SRC_ADDR = 0x1000, /* get the source ip/port with getsockname */ SI_FL_WANT_PUT = 0x2000, /* an applet would like to put some data into the buffer */ SI_FL_WANT_GET = 0x4000, /* an applet would like to get some data from the buffer */ + SI_FL_CLEAN_ABRT = 0x8000, /* SI_FL_ERR is used to report aborts, and not SHUTR */ }; /* A stream interface has 3 parts : diff --git a/src/stream.c b/src/stream.c index 32da7c2e3..ba5dbffee 100644 --- a/src/stream.c +++ b/src/stream.c @@ -195,6 +195,9 @@ struct stream *stream_new(struct session *sess, enum obj_type *origin) si_set_state(&s->si[0], SI_ST_EST); s->si[0].hcto = sess->fe->timeout.clientfin; + if (cs && cs->conn->mux && cs->conn->mux->flags & MX_FL_CLEAN_ABRT) + s->si[0].flags |= SI_FL_CLEAN_ABRT; + /* attach the incoming connection to the stream interface now. */ if (cs) si_attach_cs(&s->si[0], cs);