From 4662873d7004cff6c1bc16d131309da5e337c8a6 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 16 Jan 2015 13:31:54 +1100 Subject: [PATCH] Only add authorised clients to disconnected list --- src/stratifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stratifier.c b/src/stratifier.c index 30e57b93..a7badc22 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1256,7 +1256,7 @@ static void drop_client(sdata_t *sdata, int64_t id) HASH_DEL(sdata->stratum_instances, client); HASH_FIND(hh, sdata->disconnected_instances, &client->enonce1_64, sizeof(uint64_t), old_client); /* Only keep around one copy of the old client in server mode */ - if (!client->ckp->proxy && !old_client && client->enonce1_64) { + if (!client->ckp->proxy && !old_client && client->enonce1_64 && dec) { HASH_ADD(hh, sdata->disconnected_instances, enonce1_64, sizeof(uint64_t), client); sdata->stats.disconnected++; client->disconnected_time = time(NULL);