Commit f5ac84b8040eadcda521cbda2154613d649440ca

Con Kolivas 2012-08-21T19:32:05

select_pool does not switch back to the primary once lagging is disabled.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/cgminer.c b/cgminer.c
index 0cb2be0..a220e6e 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1955,9 +1955,11 @@ static inline struct pool *select_pool(bool lagging)
 	if (pool_strategy == POOL_BALANCE)
 		return select_balanced(cp);
 
-	if (pool_strategy != POOL_LOADBALANCE && (!lagging || opt_fail_only))
-		pool = cp;
-	else
+	if (pool_strategy != POOL_LOADBALANCE && (!lagging || opt_fail_only)) {
+		if (cp->prio != 0)
+			switch_pools(NULL);
+		pool = current_pool();
+	} else
 		pool = NULL;
 
 	while (!pool) {