Browse Source

Bugfix: Recheck has_stratum even if the pool hasn't changed, in case pool has switched to another protocol in the process; also only delay 5 seconds before retry if pool is the same

Luke Dashjr 13 years ago
parent
commit
b04f3c8810
1 changed files with 3 additions and 5 deletions
  1. 3 5
      cgminer.c

+ 3 - 5
cgminer.c

@@ -6792,11 +6792,9 @@ retry:
 			while (!pool->stratum_active) {
 				struct pool *altpool = select_pool(true);
 
-				sleep(5);
-				if (altpool != pool) {
-					pool = altpool;
-					goto retry;
-				}
+				if (altpool == pool && pool->has_stratum)
+					sleep(5);
+				goto retry;
 			}
 			gen_stratum_work(pool, work);
 			applog(LOG_DEBUG, "Generated stratum work");