Browse Source

Merge branch 'bugfix_race_popcurl' into bfgminer

Luke Dashjr 13 years ago
parent
commit
6730802c17
1 changed files with 2 additions and 1 deletions
  1. 2 1
      miner.c

+ 2 - 1
miner.c

@@ -2361,7 +2361,8 @@ static struct curl_ent *pop_curl_entry(struct pool *pool)
 	mutex_lock(&pool->pool_lock);
 	mutex_lock(&pool->pool_lock);
 	if (!pool->curls)
 	if (!pool->curls)
 		recruit_curl(pool);
 		recruit_curl(pool);
-	else if (list_empty(&pool->curlring)) {
+	else
+	while (list_empty(&pool->curlring)) {
 		if (pool->submit_fail || pool->curls >= curl_limit)
 		if (pool->submit_fail || pool->curls >= curl_limit)
 			pthread_cond_wait(&pool->cr_cond, &pool->pool_lock);
 			pthread_cond_wait(&pool->cr_cond, &pool->pool_lock);
 		else
 		else