mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
Check for cnx_needed on each loop through wait_lp_current.
This commit is contained in:
parent
919a836f14
commit
b9aa5b6528
@ -6304,12 +6304,9 @@ static struct pool *select_longpoll_pool(struct pool *cp)
|
|||||||
*/
|
*/
|
||||||
static void wait_lpcurrent(struct pool *pool)
|
static void wait_lpcurrent(struct pool *pool)
|
||||||
{
|
{
|
||||||
if (cnx_needed(pool))
|
while (!cnx_needed(pool) && (pool->enabled == POOL_DISABLED ||
|
||||||
return;
|
|
||||||
|
|
||||||
while (pool->enabled == POOL_DISABLED ||
|
|
||||||
(pool != current_pool() && pool_strategy != POOL_LOADBALANCE &&
|
(pool != current_pool() && pool_strategy != POOL_LOADBALANCE &&
|
||||||
pool_strategy != POOL_BALANCE)) {
|
pool_strategy != POOL_BALANCE))) {
|
||||||
mutex_lock(&lp_lock);
|
mutex_lock(&lp_lock);
|
||||||
pthread_cond_wait(&lp_cond, &lp_lock);
|
pthread_cond_wait(&lp_cond, &lp_lock);
|
||||||
mutex_unlock(&lp_lock);
|
mutex_unlock(&lp_lock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user