]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: fwlc: Factorize code.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 20 Jun 2025 13:53:27 +0000 (15:53 +0200)
committerOlivier Houchard <cognet@ci0.org>
Fri, 20 Jun 2025 13:59:03 +0000 (15:59 +0200)
Always set unusable if we could not use a server, instead of doing it in
each branch

This should be backported to 3.2 after e28e647fef43e5865c87f328832fec7794a423e5
is backported.

src/lb_fwlc.c

index 4a6d5bd643d064b2f70e13dcf62410d3a65d1f3d..ba2de9e416d2eaac0e01abba29a8ea3d75336763 100644 (file)
@@ -806,10 +806,8 @@ redo:
                                                 break;
                                         }
                                        avoided = s;
-                                       unusable++;
                                }
-                               else
-                                       unusable++;
+                               unusable++;
                                i++;
                        } else if (mt_list.next == &tree_elt->srv_list[(i + orig_nb) % FWLC_LISTS_NB]) {
                                i++;