Commit 8e20456bc0dc96c436f8dd3acec024326f3dcff1

Con Kolivas 2012-08-14T09:13:59

Check we are not lagging as well as there is enough work in getwork.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index 171c94c..e025109 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2320,7 +2320,7 @@ static void *get_work_thread(void *userdata)
 
 	applog(LOG_DEBUG, "Creating extra get work thread");
 
-	if (enough_work())
+	if (!wc->lagging && enough_work())
 		goto out;
 
 	ret_work = make_work();