Perform pool resus on pools that were not set as the initial pool at startup.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/cgminer.c b/cgminer.c
index 1490183..abc7755 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5167,7 +5167,7 @@ static void pool_resus(struct pool *pool)
applog(LOG_WARNING, "Pool %d %s alive", pool->pool_no, pool->rpc_url);
switch_pools(NULL);
} else
- applog(LOG_INFO, "Pool %d %s resumed returning work", pool->pool_no, pool->rpc_url);
+ applog(LOG_INFO, "Pool %d %s alive", pool->pool_no, pool->rpc_url);
}
static struct work *hash_pop(void)
@@ -6929,17 +6929,22 @@ static void *test_pool_thread(void *arg)
struct pool *pool = (struct pool *)arg;
if (pool_active(pool, false)) {
+ bool resus = false;
+
pool_tset(pool, &pool->lagging);
pool_tclear(pool, &pool->idle);
- applog(LOG_INFO, "Pool %d %s active", pool->pool_no, pool->rpc_url);
+
mutex_lock(&control_lock);
if (!pools_active) {
currentpool = pool;
if (pool->pool_no != 0)
applog(LOG_NOTICE, "Switching to pool %d %s - first alive pool", pool->pool_no, pool->rpc_url);
- }
- pools_active = true;
+ pools_active = true;
+ } else
+ resus = true;
mutex_unlock(&control_lock);
+ if (resus)
+ pool_resus(pool);
}
return NULL;