From b1b53c0cbfad37805ab0179a4f0062b4b89b03c3 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 24 Jul 2017 14:14:57 +1000 Subject: [PATCH] Fix longstanding logic error that would always open a new global proxy connection for new clients. --- src/stratifier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index b9945706..203fc529 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -4812,8 +4812,8 @@ static sdata_t *select_sdata(ckpool_t *ckp, sdata_t *ckp_sdata, const int userid best->connecting++; ck_wunlock(&ckp_sdata->instance_lock); - if (!userid) { - if (best->id != global->id || current_headroom(ckp_sdata, &proxy) < 2) + if (!userid || best->id == global->id) { + if (current_headroom(ckp_sdata, &proxy) < 2) generator_recruit(ckp, global->id, 1); } else { if (best_userproxy_headroom(ckp_sdata, userid) < 2)