From 8c87807519dfb7464aaece36cb978abb113fd066 Mon Sep 17 00:00:00 2001 From: ckolivas Date: Fri, 8 Mar 2013 15:32:10 +1100 Subject: [PATCH] Start the stratum thread only if we successfully init and authorise it, otherwise unset the init flag. --- cgminer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cgminer.c b/cgminer.c index 2d5d0891..2bd213c7 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;