mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
BUG/MINOR: stream: don't force retries if the server is DOWN
Arkadiy Kulev noticed that if a server is marked down while a connection is being trying to establish, we still insist on performing retries on the same server, which is absurd. Better perform the redispatch if we already know the server is down. Because of this, it's likely that the observe-l4 and sudden-death mechanisms are not optimal an cannot help much the connection which was used to detect the problem. The fix should be backported to 1.6 and 1.5 at least.
This commit is contained in:
parent
484b53da52
commit
49008c157e
@ -667,7 +667,8 @@ static int sess_update_st_cer(struct stream *s)
|
||||
*/
|
||||
if (objt_server(s->target) &&
|
||||
(s->be->options & PR_O_REDISP) && !(s->flags & SF_FORCE_PRST) &&
|
||||
((((s->be->redispatch_after > 0) &&
|
||||
((__objt_server(s->target)->state < SRV_ST_RUNNING) ||
|
||||
(((s->be->redispatch_after > 0) &&
|
||||
((s->be->conn_retries - si->conn_retries) %
|
||||
s->be->redispatch_after == 0)) ||
|
||||
((s->be->redispatch_after < 0) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user