Browse Source

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

ckolivas 13 years ago
parent
commit
8c87807519
1 changed files with 4 additions and 1 deletions
  1. 4 1
      cgminer.c

+ 4 - 1
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;