Commit 3dd1658e1f3410dfdf00b267593a3cbe7041c645

ckolivas 2012-08-07T12:10:01

We may as well leave one curl still available per pool instead of reaping the last one.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index cc6f949..a662c1f 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4514,6 +4514,8 @@ static void reap_curl(struct pool *pool)
 	gettimeofday(&now, NULL);
 	mutex_lock(&pool->pool_lock);
 	list_for_each_entry_safe(ent, iter, &pool->curlring, node) {
+		if (pool->curls < 2)
+			break;
 		if (now.tv_sec - ent->tv.tv_sec > 60) {
 			reaped++;
 			pool->curls--;