mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-05 01:07:59 +00:00
BUG/MINOR: backend: Don't increment conn_retries counter too early
The connection retry counter is incremented too early when a connection fails. In SC_ST_CER state, errors handling must be performed before incrementing the counter. Otherwise, we may consider the max connection attempt is reached while a last one is in fact possible. This patch must be backported to 2.6.
This commit is contained in:
parent
14a60d420a
commit
bc6b23813f
@ -2293,8 +2293,6 @@ void back_handle_st_cer(struct stream *s)
|
||||
s->conn_exp = TICK_ETERNITY;
|
||||
s->flags &= ~SF_CONN_EXP;
|
||||
|
||||
s->conn_retries++;
|
||||
|
||||
/* we probably have to release last stream from the server */
|
||||
if (objt_server(s->target)) {
|
||||
struct connection *conn = sc_conn(sc);
|
||||
@ -2389,6 +2387,7 @@ void back_handle_st_cer(struct stream *s)
|
||||
goto end;
|
||||
}
|
||||
|
||||
s->conn_retries++;
|
||||
stream_choose_redispatch(s);
|
||||
|
||||
if (must_tar) {
|
||||
|
Loading…
Reference in New Issue
Block a user