Browse Source

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

master
Con Kolivas 8 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++;
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)

Loading…
Cancel
Save