From f31980b9d0fc529e5e28669fdc8c9442f3156ede Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 21 Mar 2015 21:41:05 +1100 Subject: [PATCH] Only reconnect authorised clients --- src/stratifier.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index d80b1aac..b27f10d2 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1344,6 +1344,8 @@ static void reconnect_clients(sdata_t *sdata) ck_rlock(&sdata->instance_lock); HASH_ITER(hh, sdata->stratum_instances, client, tmpclient) { + if (!client->authorised) + continue; /* This client is bound to a user proxy */ if (client->sdata && client->sdata->proxy && client->sdata->proxy->userid) continue; @@ -1584,6 +1586,8 @@ static void check_userproxies(sdata_t *sdata, const int userid) ck_rlock(&sdata->instance_lock); HASH_ITER(hh, sdata->stratum_instances, client, tmpclient) { + if (!client->authorised) + continue; if (client->user_id != userid) continue; if (client->sdata && client->sdata->proxy && client->sdata->proxy->userid == userid)