Browse Source

Fix longstanding logic error that would always open a new global proxy connection for new clients.

master
Con Kolivas 7 years ago
parent
commit
b1b53c0cbf
  1. 4
      src/stratifier.c

4
src/stratifier.c

@ -4812,8 +4812,8 @@ static sdata_t *select_sdata(ckpool_t *ckp, sdata_t *ckp_sdata, const int userid
best->connecting++; best->connecting++;
ck_wunlock(&ckp_sdata->instance_lock); ck_wunlock(&ckp_sdata->instance_lock);
if (!userid) { if (!userid || best->id == global->id) {
if (best->id != global->id || current_headroom(ckp_sdata, &proxy) < 2) if (current_headroom(ckp_sdata, &proxy) < 2)
generator_recruit(ckp, global->id, 1); generator_recruit(ckp, global->id, 1);
} else { } else {
if (best_userproxy_headroom(ckp_sdata, userid) < 2) if (best_userproxy_headroom(ckp_sdata, userid) < 2)

Loading…
Cancel
Save