Browse Source

Check a stratum pool hasn't gone dead while being a backup pool and missed having its idle flag cleared.

Con Kolivas 13 years ago
parent
commit
9ef73d9300
1 changed files with 7 additions and 0 deletions
  1. 7 0
      cgminer.c

+ 7 - 0
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);