Commit ea7b2a7da3d3c34dfbe156af61560493007bc9aa

Con Kolivas 2013-09-07T12:14:16

Rotate pools on all failures to set a pool in select_pool.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/cgminer.c b/cgminer.c
index 37c7348..88fa16f 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2843,13 +2843,11 @@ static inline struct pool *select_pool(bool lagging)
 		if (pool->quota_used++ >= pool->quota) {
 			pool->quota_used = 0;
 			pool = NULL;
-			if (++rotating_pool >= total_pools)
-				rotating_pool = 0;
-			continue;
-		}
-		if (!pool_unworkable(pool))
+		} else if (!pool_unworkable(pool))
 			break;
 		pool = NULL;
+		if (++rotating_pool >= total_pools)
+			rotating_pool = 0;
 	}
 
 	/* If there are no alive pools with quota, choose according to