Browse Source

Make sure a passthrough client is still in the hash table before deleting it

master
Con Kolivas 10 years ago
parent
commit
712d5c38d6
  1. 1
      src/stratifier.c

1
src/stratifier.c

@ -3017,6 +3017,7 @@ static void parse_method(sdata_t *sdata, const int64_t client_id, json_t *id_val
* Remove this instance since the client id may well be * Remove this instance since the client id may well be
* reused */ * reused */
ck_wlock(&sdata->instance_lock); ck_wlock(&sdata->instance_lock);
if (likely(__instance_by_id(sdata, client_id)))
HASH_DEL(sdata->stratum_instances, client); HASH_DEL(sdata->stratum_instances, client);
ck_wunlock(&sdata->instance_lock); ck_wunlock(&sdata->instance_lock);

Loading…
Cancel
Save