From 8cd36b225bb425ad1eceeeea30cf92d468ea43e2 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 26 Feb 2015 00:02:34 +1100 Subject: [PATCH] We must flag all clients to switch on a deadproxy regardless of whether there is room on the current proxy or not --- src/stratifier.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 2795f01a..694b47c9 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1234,10 +1234,8 @@ static void dead_proxyid(sdata_t *sdata, const int64_t id, const int subid) HASH_ITER(hh, sdata->stratum_instances, client, tmp) { if (client->proxyid != id || client->subproxyid != subid) continue; - if (headroom-- < 1) - continue; reconnects++; - if (client->reconnect && hard <= SOMAXCONN / 2) { + if (headroom-- > 0 && client->reconnect && hard <= SOMAXCONN / 2) { hard++; reconnect_client(sdata, client); } else