Browse Source

Only set stratum auth once to prevent multiple threads being started.

Con Kolivas 13 years ago
parent
commit
d7c4be30ba
1 changed files with 4 additions and 1 deletions
  1. 4 1
      cgminer.c

+ 4 - 1
cgminer.c

@@ -4997,7 +4997,10 @@ retry_stratum:
 			return false;
 		if (!auth_stratum(pool))
 			return false;
-		pool->stratum_auth = true;
+		/* Only set stratum_auth once to prevent multiple threads
+		 * being started */
+		if (pool_tset(pool, &pool->stratum_auth))
+			return true;
 		pool->idle = false;
 		init_stratum_thread(pool);
 		return true;