diff --git a/src/backend.c b/src/backend.c index e757acc54..88db58883 100644 --- a/src/backend.c +++ b/src/backend.c @@ -1347,17 +1347,12 @@ int srv_count_retry_down(struct session *t, int conn_err) { /* we are in front of a retryable error */ t->conn_retries--; - if (t->srv) - t->srv->retries++; - t->be->retries++; if (t->conn_retries < 0) { /* if not retryable anymore, let's abort */ tv_eternity(&t->req->cex); srv_close_with_err(t, conn_err, SN_FINST_C, 503, error_message(t, HTTP_ERR_503)); - if (t->srv) - t->srv->cum_sess++; if (t->srv) t->srv->failed_conns++; t->be->failed_conns++; diff --git a/src/proto_http.c b/src/proto_http.c index db37035d7..c01c90aab 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -2507,8 +2507,6 @@ int process_srv(struct session *t) if (may_dequeue_tasks(t->srv, t->be)) task_wakeup(t->srv->queue_mgt); - if (t->srv) - t->srv->cum_sess++; if (t->srv) t->srv->failed_conns++; t->be->redispatches++; @@ -2520,6 +2518,10 @@ int process_srv(struct session *t) /* first, get a connection */ if (srv_redispatch_connect(t)) return t->srv_state != SV_STCONN; + } else { + if (t->srv) + t->srv->retries++; + t->be->retries++; } do {