Fix for bref_cmp_current_load() algorithm.

Fix for bref_cmp_current_load() algorithm when weight is present
This commit is contained in:
MassimilianoPinto
2017-01-09 18:16:10 +01:00
parent f32471d1cb
commit 45e26c63a5

View File

@ -401,8 +401,8 @@ static int bref_cmp_current_load(const void *bref1, const void *bref2)
return -1; return -1;
} }
return ((1000 * b1->server->stats.n_current_ops) - b1->weight) - return ((1000 + 1000 * b1->server->stats.n_current_ops) / b1->weight) -
((1000 * b2->server->stats.n_current_ops) - b2->weight); ((1000 + 1000 * b2->server->stats.n_current_ops) / b2->weight);
} }
/** /**