Browse Source

Bugfix: Don't keep making new get_work threads if all pools are dead

Luke Dashjr 13 years ago
parent
commit
06041dd0c9
1 changed files with 3 additions and 0 deletions
  1. 3 0
      cgminer.c

+ 3 - 0
cgminer.c

@@ -3111,11 +3111,14 @@ retry:
 
 	applog(LOG_DEBUG, "Popping work from get queue to get work");
 
+keepwaiting:
 	/* wait for 1st response, or get cached response */
 	work_heap = hash_pop(&abstime);
 	if (unlikely(!work_heap)) {
 		/* Attempt to switch pools if this one times out */
 		pool_died(pool);
+		if (pool == current_pool())
+			goto keepwaiting;
 		goto retry;
 	}