From 52b81dfe229704997f7c68a40e55dd2619acba9d Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 27 Jan 2015 15:40:28 +1100 Subject: [PATCH] Match to existing worker instance from the userlist, not the client list which gets emptied --- src/stratifier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index c41460d3..532f32fd 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2130,7 +2130,7 @@ static user_instance_t *generate_user(ckpool_t *ckp, stratum_instance_t *client, char *base_username = strdupa(workername), *username; bool new_instance = false, new_worker = false; sdata_t *sdata = ckp->data; - stratum_instance_t *tmp; + worker_instance_t *tmp; user_instance_t *user; int len; @@ -2151,9 +2151,9 @@ static user_instance_t *generate_user(ckpool_t *ckp, stratum_instance_t *client, user->id = sdata->user_instance_id++; HASH_ADD_STR(sdata->user_instances, username, user); } - DL_FOREACH(user->instances, tmp) { + DL_FOREACH(user->worker_instances, tmp) { if (!safecmp(workername, tmp->workername)) { - client->worker_instance = tmp->worker_instance; + client->worker_instance = tmp; break; } }