Must unlock mutex within loop.
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)