Browse Source

Only trigger connection recruitment if we're reconnecting clients

master
Con Kolivas 10 years ago
parent
commit
5123b2e0ec
  1. 4
      src/stratifier.c

4
src/stratifier.c

@ -1172,10 +1172,10 @@ static void reconnect_clients(sdata_t *sdata)
if (reconnects) { if (reconnects) {
LOGNOTICE("Flagged %d clients for reconnect to proxy %d", reconnects, LOGNOTICE("Flagged %d clients for reconnect to proxy %d", reconnects,
proxy->id); proxy->id);
}
if (headroom < 42) if (headroom < 42)
generator_recruit(sdata->ckp); generator_recruit(sdata->ckp);
} }
}
static proxy_t *current_proxy(sdata_t *sdata) static proxy_t *current_proxy(sdata_t *sdata)
{ {
@ -2258,10 +2258,10 @@ static void dead_proxy(sdata_t *sdata, const char *buf)
if (reconnects) { if (reconnects) {
LOGNOTICE("Flagged %d clients to reconnect from dead proxy %d:%d", reconnects, LOGNOTICE("Flagged %d clients to reconnect from dead proxy %d:%d", reconnects,
id, subid); id, subid);
}
if (headroom < 42) if (headroom < 42)
generator_recruit(sdata->ckp); generator_recruit(sdata->ckp);
} }
}
/* Must hold a reference */ /* Must hold a reference */
static void lazy_reconnect_client(sdata_t *sdata, stratum_instance_t *client) static void lazy_reconnect_client(sdata_t *sdata, stratum_instance_t *client)

Loading…
Cancel
Save