Commit e16b7566bdd16ad862b5b0e75476189d8f0a2b2f

Con Kolivas 2012-08-16T15:49:11

Don't keep queueing work indefinitely if we're in opt failover mode.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index a39a83b..1449617 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2409,7 +2409,7 @@ static void *get_work_thread(void *userdata)
 	mutex_unlock(stgd_lock);
 
 	if (((cs >= opt_queue || cq >= opt_queue) && ts >= maxq) ||
-	    ((cs >= opt_queue || cq >= opt_queue) && tq >= maxq && cq < maxq) ||
+	    ((cs >= opt_queue || cq >= opt_queue) && tq >= maxq && ((cq < maxq && !opt_fail_only) || opt_fail_only)) ||
 	    clone_available())
 		goto out;