Browse Source

Bugfix: Don't warn for stale-on-arrival work if the pool is already disabled for it

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

+ 2 - 2
miner.c

@@ -3054,11 +3054,11 @@ static void *stage_thread(void *userdata)
 		test_work_current(work);
 
 		if (stale_work3(work, false, false)) {
+			struct pool *pool = work->pool;
 			struct timeval now;
 			gettimeofday(&now, NULL);
-			if (work->tv_staged.tv_sec >= now.tv_sec - 2) {
+			if (work->tv_staged.tv_sec >= now.tv_sec - 2 && pool->enabled != POOL_REJECTING) {
 				// Only for freshly fetched work, disable the pool giving it to us stale
-				struct pool *pool = work->pool;
 				applog(LOG_WARNING, "Pool %u gave us stale-on-arrival work, disabling!", pool->pool_no);
 				reject_pool(pool);
 				if (pool == current_pool())