Commit d7c4be30ba6d0a89ca801c95aa3ea710c46dbf56

Con Kolivas 2013-03-07T21:41:01

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

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 b94d750..f073f9e 100644
--- a/cgminer.c
+++ b/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;