mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 23:56:57 +02:00
MEDIUM: frontend: move some remaining stream settings to stream_new()
The auto-forwarding mechanism in case no analyser is set is generic to the streams. Also the timeouts on the client side are better preset in the stream initialization as well.
This commit is contained in:
parent
e0232f1e33
commit
c8815efb06
@ -141,15 +141,6 @@ int frontend_accept(struct stream *s)
|
||||
if (fe->mode == PR_MODE_HTTP)
|
||||
s->req.flags |= CF_READ_DONTWAIT; /* one read is usually enough */
|
||||
|
||||
/* note: this should not happen anymore since there's always at least the switching rules */
|
||||
if (!s->req.analysers) {
|
||||
channel_auto_connect(&s->req); /* don't wait to establish connection */
|
||||
channel_auto_close(&s->req); /* let the producer forward close requests */
|
||||
}
|
||||
|
||||
s->req.rto = fe->timeout.client;
|
||||
s->res.wto = fe->timeout.client;
|
||||
|
||||
/* everything's OK, let's go on */
|
||||
return 1;
|
||||
|
||||
|
@ -191,8 +191,13 @@ struct stream *stream_new(struct session *sess, struct task *t)
|
||||
/* activate default analysers enabled for this listener */
|
||||
s->req.analysers = l->analysers;
|
||||
|
||||
if (!s->req.analysers) {
|
||||
channel_auto_connect(&s->req); /* don't wait to establish connection */
|
||||
channel_auto_close(&s->req); /* let the producer forward close requests */
|
||||
}
|
||||
|
||||
s->req.rto = sess->fe->timeout.client;
|
||||
s->req.wto = TICK_ETERNITY;
|
||||
s->req.rto = TICK_ETERNITY;
|
||||
s->req.rex = TICK_ETERNITY;
|
||||
s->req.wex = TICK_ETERNITY;
|
||||
s->req.analyse_exp = TICK_ETERNITY;
|
||||
@ -206,8 +211,8 @@ struct stream *stream_new(struct session *sess, struct task *t)
|
||||
s->res.flags |= CF_NEVER_WAIT;
|
||||
}
|
||||
|
||||
s->res.wto = sess->fe->timeout.client;
|
||||
s->res.rto = TICK_ETERNITY;
|
||||
s->res.wto = TICK_ETERNITY;
|
||||
s->res.rex = TICK_ETERNITY;
|
||||
s->res.wex = TICK_ETERNITY;
|
||||
s->res.analyse_exp = TICK_ETERNITY;
|
||||
|
Loading…
Reference in New Issue
Block a user