mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Avoid applog under cg_wlock.
This commit is contained in:
parent
8d22ca1ac1
commit
67ebf45c19
@ -6598,16 +6598,20 @@ static void *test_pool_thread(void *arg)
|
|||||||
if (pool_active(pool, false)) {
|
if (pool_active(pool, false)) {
|
||||||
pool_tset(pool, &pool->lagging);
|
pool_tset(pool, &pool->lagging);
|
||||||
pool_tclear(pool, &pool->idle);
|
pool_tclear(pool, &pool->idle);
|
||||||
|
bool first_pool = false;
|
||||||
|
|
||||||
cg_wlock(&control_lock);
|
cg_wlock(&control_lock);
|
||||||
if (!pools_active) {
|
if (!pools_active) {
|
||||||
currentpool = pool;
|
currentpool = pool;
|
||||||
if (pool->pool_no != 0)
|
if (pool->pool_no != 0)
|
||||||
applog(LOG_NOTICE, "Switching to pool %d %s - first alive pool", pool->pool_no, pool->rpc_url);
|
first_pool = true;
|
||||||
pools_active = true;
|
pools_active = true;
|
||||||
}
|
}
|
||||||
cg_wunlock(&control_lock);
|
cg_wunlock(&control_lock);
|
||||||
|
|
||||||
|
if (unlikely(first_pool))
|
||||||
|
applog(LOG_NOTICE, "Switching to pool %d %s - first alive pool", pool->pool_no, pool->rpc_url);
|
||||||
|
|
||||||
pool_resus(pool);
|
pool_resus(pool);
|
||||||
} else
|
} else
|
||||||
pool_died(pool);
|
pool_died(pool);
|
||||||
|
Loading…
Reference in New Issue
Block a user