|
|
@ -3322,6 +3322,7 @@ static void _dec_instance_ref(sdata_t *sdata, stratum_instance_t *client, const |
|
|
|
} |
|
|
|
} |
|
|
|
ck_wunlock(&sdata->instance_lock); |
|
|
|
ck_wunlock(&sdata->instance_lock); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (entries) |
|
|
|
notice_msg_entries(&entries); |
|
|
|
notice_msg_entries(&entries); |
|
|
|
/* This should never happen */ |
|
|
|
/* This should never happen */ |
|
|
|
if (unlikely(ref < 0)) |
|
|
|
if (unlikely(ref < 0)) |
|
|
@ -3541,7 +3542,7 @@ static void drop_client(ckpool_t *ckp, sdata_t *sdata, const int64_t id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
char_entry_t *entries = NULL; |
|
|
|
char_entry_t *entries = NULL; |
|
|
|
stratum_instance_t *client; |
|
|
|
stratum_instance_t *client; |
|
|
|
char *msg; |
|
|
|
char *msg = NULL; |
|
|
|
|
|
|
|
|
|
|
|
LOGINFO("Stratifier asked to drop client %"PRId64, id); |
|
|
|
LOGINFO("Stratifier asked to drop client %"PRId64, id); |
|
|
|
|
|
|
|
|
|
|
@ -3553,12 +3554,14 @@ static void drop_client(ckpool_t *ckp, sdata_t *sdata, const int64_t id) |
|
|
|
* now but wait till the reference is dropped */ |
|
|
|
* now but wait till the reference is dropped */ |
|
|
|
if (!client->ref) { |
|
|
|
if (!client->ref) { |
|
|
|
__drop_client(sdata, client, false, &msg); |
|
|
|
__drop_client(sdata, client, false, &msg); |
|
|
|
|
|
|
|
if (msg) |
|
|
|
add_msg_entry(&entries, &msg); |
|
|
|
add_msg_entry(&entries, &msg); |
|
|
|
} else |
|
|
|
} else |
|
|
|
client->dropped = true; |
|
|
|
client->dropped = true; |
|
|
|
} |
|
|
|
} |
|
|
|
ck_wunlock(&sdata->instance_lock); |
|
|
|
ck_wunlock(&sdata->instance_lock); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (entries) |
|
|
|
notice_msg_entries(&entries); |
|
|
|
notice_msg_entries(&entries); |
|
|
|
reap_proxies(ckp, sdata); |
|
|
|
reap_proxies(ckp, sdata); |
|
|
|
} |
|
|
|
} |
|
|
|