[MEDIUM] session: initialize server-side timeouts after connect()
It was particularly embarrassing that the server timeout was assigned
to buffers during an accept() just to be potentially changed later in
case of a use_backend rule. The frontend side has nothing to do with
server timeouts.
Now we initialize them right after the connect() succeeds. Later this
should change for a unique stream-interface timeout setting only.
diff --git a/src/session.c b/src/session.c
index ec8d07b..08bb4c3 100644
--- a/src/session.c
+++ b/src/session.c
@@ -347,6 +347,11 @@
rep->analysers |= s->fe->fe_rsp_ana | s->be->be_rsp_ana;
rep->flags |= BF_READ_ATTACHED; /* producer is now attached */
+ if (si->connect) {
+ /* real connections have timeouts */
+ req->wto = s->be->timeout.server;
+ rep->rto = s->be->timeout.server;
+ }
req->wex = TICK_ETERNITY;
}