Browse Source

Only trigger connection recruitment if we're reconnecting clients

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

8
src/stratifier.c

@ -1172,9 +1172,9 @@ 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)
generator_recruit(sdata->ckp);
} }
if (headroom < 42)
generator_recruit(sdata->ckp);
} }
static proxy_t *current_proxy(sdata_t *sdata) static proxy_t *current_proxy(sdata_t *sdata)
@ -2258,9 +2258,9 @@ 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)
generator_recruit(sdata->ckp);
} }
if (headroom < 42)
generator_recruit(sdata->ckp);
} }
/* Must hold a reference */ /* Must hold a reference */

Loading…
Cancel
Save