From 9ef73d930054559d0c3128177a5c053afdfc4c0e Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 17 Dec 2012 12:27:50 +1100 Subject: [PATCH] Check a stratum pool hasn't gone dead while being a backup pool and missed having its idle flag cleared. --- cgminer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cgminer.c b/cgminer.c index bb4c2f79..335f77ee 100644 --- a/cgminer.c +++ b/cgminer.c @@ -4602,6 +4602,13 @@ static void *stratum_thread(void *userdata) continue; } + /* Check this pool hasn't died while being a backup pool and + * has not had its idle flag cleared */ + if (pool_tclear(pool, &pool->idle)) { + applog(LOG_INFO, "Stratum connection to pool %d resumed", pool->pool_no); + pool_resus(pool); + } + if (!parse_method(pool, s) && !parse_stratum_response(pool, s)) applog(LOG_INFO, "Unknown stratum msg: %s", s); free(s);