Commit 84064a2b1e5ac77f4e753d97ae74c9d031d69598

Con Kolivas 2012-05-31T19:25:33

Must unlock mutex within loop.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/cgminer.c b/cgminer.c
index ea04424..9565fc1 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4028,8 +4028,8 @@ static void wait_lpcurrent(struct pool *pool)
 	while (pool != current_pool()) {
 		mutex_lock(&lp_lock);
 		pthread_cond_wait(&lp_cond, &lp_lock);
+		mutex_unlock(&lp_lock);
 	}
-	mutex_unlock(&lp_lock);
 }
 
 static void *longpoll_thread(void *userdata)