From 2b6b3fdbd7498a1a1cd1c92b773f145cc6887e3f Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 24 Feb 2015 14:14:45 +1100 Subject: [PATCH] Look for replacement proxies in wait_best_proxy as well --- src/generator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index 38e020d7..690d8ce2 100644 --- a/src/generator.c +++ b/src/generator.c @@ -1983,7 +1983,9 @@ static proxy_instance_t *wait_best_proxy(ckpool_t *ckp, gdata_t *gdata) if (proxi->disabled) continue; if (proxi->alive || subproxies_alive(proxi)) { - if (!ret || proxi->low_id < ret->low_id) + if ((!ret) || + (proxi->low_id < ret->low_id) || + (proxi->low_id == ret->low_id && proxi->id > ret->id)) ret = proxi; } }