diff --git a/include/haproxy/stconn-t.h b/include/haproxy/stconn-t.h index 0aa2178ab..89f1009c9 100644 --- a/include/haproxy/stconn-t.h +++ b/include/haproxy/stconn-t.h @@ -74,7 +74,6 @@ enum se_flags { SE_FL_WAIT_DATA = 0x00800000, /* stream endpoint cannot work without more data from the stream's output */ SE_FL_WONT_CONSUME = 0x01000000, /* stream endpoint will not consume more data */ SE_FL_HAVE_NO_DATA = 0x02000000, /* the endpoint has no more data to deliver to the stream */ - SE_FL_APP_MASK = 0x02e00000, /* Mask for flags set by the app layer */ /* unused 0x04000000,*/ /* unused 0x08000000,*/ /* unused 0x10000000,*/ diff --git a/src/stconn.c b/src/stconn.c index e1d363549..28f77ecb8 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -378,10 +378,10 @@ static void sc_detach_endp(struct stconn **scp) } if (sc->sedesc) { - /* the sc is the only one one the endpoint */ + /* the SD wasn't used and can be recycled */ sc->sedesc->se = NULL; sc->sedesc->conn = NULL; - sc_ep_clr(sc, ~SE_FL_APP_MASK); + sc->sedesc->flags = 0; sc_ep_set(sc, SE_FL_DETACHED); } @@ -460,7 +460,6 @@ int sc_reset_endp(struct stconn *sc) sc_ep_set(sc, SE_FL_ERROR); return -1; } - se_fl_setall(new_sd, sc_ep_get(sc) & SE_FL_APP_MASK); /* The app is still attached, the sc will not be released */ sc_detach_endp(&sc);