From 0e0093e6020ed955a177af8eb576e42de5078129 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 24 Aug 2012 01:23:54 +1000 Subject: [PATCH] Select pool regardless of whether we're lagging or not, and don't queue another request in switch pool to avoid infinite recursion. --- cgminer.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cgminer.c b/cgminer.c index ff7bd5fd..d7396b1e 100644 --- a/cgminer.c +++ b/cgminer.c @@ -2678,8 +2678,6 @@ void switch_pools(struct pool *selected) mutex_lock(&lp_lock); pthread_cond_broadcast(&lp_cond); mutex_unlock(&lp_lock); - - queue_request(NULL, false); } static void discard_work(struct work *work) @@ -3919,10 +3917,7 @@ static bool queue_request(struct thr_info *thr, bool needed) if ((!needed || opt_fail_only) && (cp->staged + cp->queued >= maxq)) return true; - if (needed && !ts) - pool = select_pool(true); - else - pool = cp; + pool = select_pool(needed && !ts); if (pool->staged + pool->queued >= maxq) return true;