From 9c262b7fe86b65fd1565128c081c7be5e11bac23 Mon Sep 17 00:00:00 2001 From: ckolivas Date: Sat, 17 Jan 2015 22:48:13 +1100 Subject: [PATCH] Keep worker instances in the linked list since we don't know if we're removing the last one or not --- src/stratifier.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index c3f795c6..59eaaf52 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -862,13 +862,8 @@ static void __kill_instance(sdata_t *sdata, stratum_instance_t *client) { user_instance_t *instance = client->user_instance; - if (instance) { - worker_instance_t *worker = client->worker_instance; - + if (likely(instance)) DL_DELETE(instance->instances, client); - if (worker) - DL_DELETE(instance->worker_instances, worker); - } LL_PREPEND(sdata->dead_instances, client); sdata->stats.dead++; }