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:
Markus Mäkelä
2017-06-29 09:33:42 +03:00
parent f7500cce9e
commit 5384162fb1

View File

@ -58,7 +58,7 @@ static SRWBackend compare_backends(SRWBackend a, SRWBackend b, select_criteria_t
return a; return a;
} }
return p(a, b) < 0 ? a : b; return p(a, b) <= 0 ? a : b;
} }
void handle_connection_keepalive(RWSplit *inst, RWSplitSession *rses, void handle_connection_keepalive(RWSplit *inst, RWSplitSession *rses,