Browse Source

Must unlock mutex within loop.

Con Kolivas 13 years ago
parent
commit
84064a2b1e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cgminer.c

+ 1 - 1
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)