From d7c4be30ba6d0a89ca801c95aa3ea710c46dbf56 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 7 Mar 2013 21:41:01 +1100 Subject: [PATCH] Only set stratum auth once to prevent multiple threads being started. --- cgminer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cgminer.c b/cgminer.c index b94d750a..f073f9ee 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;