From baef99118637012b0d66a15084760c43d95b8ce9 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 21 Mar 2015 22:26:27 +1100 Subject: [PATCH] Use correct test for recruiting more global proxies --- src/stratifier.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index b3ba8815..3efc8043 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2854,9 +2854,10 @@ static sdata_t *select_sdata(const ckpool_t *ckp, sdata_t *ckp_sdata, const int LOGWARNING("Temporarily insufficient subproxies to accept more clients"); return NULL; } - if (best->global && (best->id != current->id || current->headroom < 2)) - generator_recruit(ckp, current->id, 1); - else if (userid) { + if (!userid) { + if (best->id != current->id || current_headroom(ckp_sdata, &proxy) < 2) + generator_recruit(ckp, current->id, 1); + } else { if (proxy_headroom(ckp_sdata, userid) < 2) generator_recruit(ckp, best->id, 1); }