BUG/MINOR: peers: fix logical "and" when checking for local in PEER_APP_ST_STARTING

The expression to check both peer->local and appctx_is_back() uses a
bitwise '&' instead of a logical '&&'. Fortunately both values are
always either 0 or 1 so there is no impact. This can be backported to
all stable versions.
This commit is contained in:
Willy Tarreau 2026-04-27 14:30:45 +02:00
parent 25c8d7b094
commit 24914b67b7

View File

@ -3571,7 +3571,7 @@ static void sync_peer_app_state(struct peers *peers, struct peer *peer)
}
else if (peer->appstate == PEER_APP_ST_STARTING) {
clear_peer_learning_status(peer);
if (peer->local & appctx_is_back(peer->appctx)) {
if (peer->local && appctx_is_back(peer->appctx)) {
/* if local peer has accepted the connection (appctx is
* on the backend side), flag it to learn a lesson and
* be sure it will start immediately. This only happens