Fix slave server candidate ordering
The return value of the comparison was misinterpreted so that the selection process preferred the new candidate over the current one if both were equal. This was not an intended change and only a better candidate should be chosen over the current candidate.
This commit is contained in:
@ -58,7 +58,7 @@ static SRWBackend compare_backends(SRWBackend a, SRWBackend b, select_criteria_t
|
||||
return a;
|
||||
}
|
||||
|
||||
return p(a, b) < 0 ? a : b;
|
||||
return p(a, b) <= 0 ? a : b;
|
||||
}
|
||||
|
||||
void handle_connection_keepalive(RWSplit *inst, RWSplitSession *rses,
|
||||
|
Reference in New Issue
Block a user