diff --git a/src/stratifier.c b/src/stratifier.c index 50a40eae..8b65d430 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -3268,14 +3268,9 @@ static void parse_method(sdata_t *sdata, stratum_instance_t *client, const int64 LOGNOTICE("Adding passthrough client %ld", client_id); /* We need to inform the connector process that this client * is a passthrough and to manage its messages accordingly. - * Remove this instance since the client id may well be - * reused */ - ck_wlock(&sdata->instance_lock); - if (likely(__instance_by_id(sdata, client_id))) - HASH_DEL(sdata->stratum_instances, client); - __kill_instance(client); - ck_wunlock(&sdata->instance_lock); - + * The client_id stays on the list but we won't send anything + * to it since it's unauthorised. Set the flag just in case. */ + client->authorised = false; snprintf(buf, 255, "passthrough=%ld", client_id); send_proc(client->ckp->connector, buf); return;