Commit 8c87807519dfb7464aaece36cb978abb113fd066

ckolivas 2013-03-08T15:32:10

Start the stratum thread only if we successfully init and authorise it, otherwise unset the init flag.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/cgminer.c b/cgminer.c
index 2d5d089..2bd213c 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4997,7 +4997,10 @@ retry_stratum:
 			bool ret = initiate_stratum(pool) && auth_stratum(pool);
 
 			pool->idle = ret;
-			init_stratum_thread(pool);
+			if (ret)
+				init_stratum_thread(pool);
+			else
+				pool_tclear(pool, &pool->stratum_init);
 			return ret;
 		}
 		return pool->stratum_active;