Browse Source

Keep worker instances in the linked list since we don't know if we're removing the last one or not

master
ckolivas 10 years ago
parent
commit
9c262b7fe8
  1. 7
      src/stratifier.c

7
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; user_instance_t *instance = client->user_instance;
if (instance) { if (likely(instance))
worker_instance_t *worker = client->worker_instance;
DL_DELETE(instance->instances, client); DL_DELETE(instance->instances, client);
if (worker)
DL_DELETE(instance->worker_instances, worker);
}
LL_PREPEND(sdata->dead_instances, client); LL_PREPEND(sdata->dead_instances, client);
sdata->stats.dead++; sdata->stats.dead++;
} }

Loading…
Cancel
Save