From cd342551a876dacd02a9847315ab9932501f6d9e Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 24 Feb 2015 20:38:44 +1100 Subject: [PATCH] Count reconnecting clients as part of the headroom consumed --- src/stratifier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 602fe6d0..f31dac4f 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1244,9 +1244,9 @@ static void reassess_headroom(sdata_t *sdata, const proxy_t *proxy) ck_rlock(&sdata->instance_lock); HASH_ITER(hh, sdata->stratum_instances, client, tmpclient) { - if (client->dropped || client->reconnect) + if (client->dropped) continue; - if (client->proxyid != proxy->id) + if (client->reconnect || client->proxyid != proxy->id) headroom--; } ck_runlock(&sdata->instance_lock);