From 974f65c67f2ca3f512eec69b7a1620e4979302ee Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 10 Oct 2012 23:22:24 +1100 Subject: [PATCH] Ignore the value of stratum_active on calling initiate_stratum and assume we're always trying to reinitiate it, and set the active flag to false in that function. --- cgminer.c | 1 - util.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/cgminer.c b/cgminer.c index 71bae1d0..27de6cbc 100644 --- a/cgminer.c +++ b/cgminer.c @@ -4180,7 +4180,6 @@ static void *stratum_thread(void *userdata) pool->getfail_occasions++; total_go++; - pool->stratum_active = false; if (initiate_stratum(pool) && auth_stratum(pool)) continue; diff --git a/util.c b/util.c index 3b90f8e8..42644406 100644 --- a/util.c +++ b/util.c @@ -1217,9 +1217,6 @@ bool initiate_stratum(struct pool *pool) json_error_t err; bool ret = false; - if (pool->stratum_active) - return true; - if (!pool->stratum_curl) { pool->stratum_curl = curl_easy_init(); if (unlikely(!pool->stratum_curl)) @@ -1319,6 +1316,7 @@ out: pool->pool_no, pool->nonce1, pool->n2size); } } else { + pool->stratum_active = false; if (curl) { curl_easy_cleanup(curl); pool->stratum_curl = NULL;