CLEANUP: stream: remove unneeded test on appctx during initialization

Now that the data consumption from the endpoint is the default setting,
we can generalize the pre-clearing of the wont_consume flag, which is
no more specific to applets. In practice it's not needed anymore to do
it, but since streams might be initiatied from asynchronous applets,
these might have blocked their consumption side before creating the
stream thus it's safer to preserve the clearing of the flag.
This commit is contained in:
Willy Tarreau 2022-05-27 16:49:18 +02:00
parent e4ebe261b1
commit 369d5aa208
1 changed files with 2 additions and 3 deletions

View File

@ -535,8 +535,7 @@ struct stream *stream_new(struct session *sess, struct stconn *sc, struct buffer
if (flt_stream_init(s) < 0 || flt_stream_start(s) < 0)
goto out_fail_accept;
/* finish initialization of the accepted file descriptor */
if (sc_appctx(sc))
/* just in case the caller would have pre-disabled it */
se_will_consume(s->scf->sedesc);
if (sess->fe->accept && sess->fe->accept(s) < 0)