mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-05 10:58:14 +00:00
[MEDIUM] session: don't assign conn_retries upon accept() anymore
The conn_retries attribute is now assigned when switching from SI_ST_INI to SI_ST_REQ. This eliminates one of the last dependencies on the backend in the frontend's accept() function.
This commit is contained in:
parent
ee28de0a12
commit
070ceb6cfb
@ -157,7 +157,6 @@ int frontend_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
|
||||
|
||||
s->srv = s->prev_srv = s->srv_conn = NULL;
|
||||
s->pend_pos = NULL;
|
||||
s->si[1].conn_retries = s->be->conn_retries;
|
||||
|
||||
/* init store persistence */
|
||||
s->store_count = 0;
|
||||
|
@ -6726,7 +6726,6 @@ void http_reset_txn(struct session *s)
|
||||
s->store_count = 0;
|
||||
|
||||
s->pend_pos = NULL;
|
||||
s->req->cons->conn_retries = s->be->conn_retries;
|
||||
|
||||
s->req->flags |= BF_READ_DONTWAIT; /* one read is usually enough */
|
||||
|
||||
|
@ -719,7 +719,6 @@ int session_set_backend(struct session *s, struct proxy *be)
|
||||
proxy_inc_be_ctr(be);
|
||||
|
||||
/* assign new parameters to the session from the new backend */
|
||||
s->si[1].conn_retries = be->conn_retries;
|
||||
s->si[1].flags &= ~SI_FL_INDEP_STR;
|
||||
if (be->options2 & PR_O2_INDEPSTR)
|
||||
s->si[1].flags |= SI_FL_INDEP_STR;
|
||||
|
@ -1380,6 +1380,7 @@ resync_stream_interface:
|
||||
* request.
|
||||
*/
|
||||
s->req->cons->state = SI_ST_REQ; /* new connection requested */
|
||||
s->req->cons->conn_retries = s->be->conn_retries;
|
||||
if (unlikely(s->req->cons->iohandler && !s->req->cons->connect)) {
|
||||
s->req->cons->state = SI_ST_EST; /* connection established */
|
||||
s->rep->flags |= BF_READ_ATTACHED; /* producer is now attached */
|
||||
|
Loading…
Reference in New Issue
Block a user