Browse Source

Merge commit 'fcb2653' into cg_merges_20121208

Conflicts:
	miner.c
Luke Dashjr 13 years ago
parent
commit
2f82adc82f
1 changed files with 5 additions and 1 deletions
  1. 5 1
      miner.c

+ 5 - 1
miner.c

@@ -3396,6 +3396,8 @@ static void pool_died(struct pool *pool)
 
 static void gen_stratum_work(struct pool *pool, struct work *work);
 
+static void pool_resus(struct pool *pool);
+
 static void *getwork_thread(void __maybe_unused *userdata)
 {
 	pthread_detach(pthread_self());
@@ -3513,6 +3515,9 @@ retry:
 			goto retry;
 		}
 		pool_tclear(pool, &pool->lagging);
+		if (pool_tclear(pool, &pool->idle))
+			pool_resus(pool);
+
 		applog(LOG_DEBUG, "Generated getwork work");
 		stage_work(work);
 		push_curl_entry(ce, pool);
@@ -5517,7 +5522,6 @@ static void shutdown_stratum(struct pool *pool)
 	pool->stratum_url = NULL;
 }
 
-static void pool_resus(struct pool *pool);
 static bool pool_active(struct pool *pool, bool pinging);
 
 static void clear_stratum_shares(struct pool *pool)