diff --git a/include/haproxy/stconn-t.h b/include/haproxy/stconn-t.h index e2f13f101..4396b02cd 100644 --- a/include/haproxy/stconn-t.h +++ b/include/haproxy/stconn-t.h @@ -284,6 +284,10 @@ struct stconn { unsigned int flags; /* SC_FL_* */ unsigned int ioto; /* I/O activity timeout */ + ssize_t room_needed; /* free space in the input buffer required to receive more data. + * -1 : the SC is waiting for room but not on a specific amount of data + * >= 0 : min free space required to progress. 0 means SC must be unblocked ASAP + */ struct wait_event wait_event; /* We're in a wait list */ struct sedesc *sedesc; /* points to the stream endpoint descriptor */ enum obj_type *app; /* points to the applicative point (stream or check) */ diff --git a/src/stconn.c b/src/stconn.c index 845833189..cb3d750a8 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -136,6 +136,7 @@ static struct stconn *sc_new(struct sedesc *sedesc) sc->flags = SC_FL_NONE; sc->state = SC_ST_INI; sc->ioto = TICK_ETERNITY; + sc->room_needed = 0; sc->app = NULL; sc->app_ops = NULL; sc->src = NULL;