From 0e1d4dd4f1024019a917ebf611c7489c87fb4b4c Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 21 Mar 2015 18:45:11 +1100 Subject: [PATCH] Don't reconnect clients bound to user proxies on global changes --- src/stratifier.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stratifier.c b/src/stratifier.c index f1005db4..88fde89b 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1308,7 +1308,7 @@ static void generator_recruit(const ckpool_t *ckp, const int recruits) /* Find how much headroom we have and connect up to that many clients that are * not currently on this pool, setting the reconnect for the remainder to be - * switched lazily. */ + * switched lazily. Only reconnect clients bound to global proxies. */ static void reconnect_clients(sdata_t *sdata) { stratum_instance_t *client, *tmpclient; @@ -1322,6 +1322,9 @@ static void reconnect_clients(sdata_t *sdata) ck_rlock(&sdata->instance_lock); HASH_ITER(hh, sdata->stratum_instances, client, tmpclient) { + /* This client is bound to a user proxy */ + if (client->sdata && client->sdata->proxy && client->sdata->proxy->userid) + continue; if (client->proxyid == proxy->id) continue; if (headroom-- < 1)