Commit 38048501417823c8614c98271bb3df3a8202838c

Con Kolivas 2013-02-07T13:51:54

Do not consider every call to stratum_resumed a pool recovery unless it was actually idle.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/cgminer.c b/cgminer.c
index 165c7d7..3d54b72 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4639,9 +4639,10 @@ static void stratum_resumed(struct pool *pool)
 {
 	if (!pool->stratum_notify)
 		return;
-	applog(LOG_INFO, "Stratum connection to pool %d resumed", pool->pool_no);
-	pool_tclear(pool, &pool->idle);
-	pool_resus(pool);
+	if (pool_tclear(pool, &pool->idle)) {
+		applog(LOG_INFO, "Stratum connection to pool %d resumed", pool->pool_no);
+		pool_resus(pool);
+	}
 }
 
 /* One stratum thread per pool that has stratum waits on the socket checking