Browse Source

Avoid clearing pool->block_id unless we really are changing pools

Luke Dashjr 13 years ago
parent
commit
a595a6c719
1 changed files with 3 additions and 1 deletions
  1. 3 1
      cgminer.c

+ 3 - 1
cgminer.c

@@ -2391,11 +2391,13 @@ void switch_pools(struct pool *selected)
 
 	currentpool = pools[pool_no];
 	pool = currentpool;
-	pool->block_id = 0;
 	mutex_unlock(&control_lock);
 
 	if (pool != last_pool)
+	{
+		pool->block_id = 0;
 		applog(LOG_WARNING, "Switching to %s", pool->rpc_url);
+	}
 
 	/* Reset the queued amount to allow more to be queued for the new pool */
 	mutex_lock(&qd_lock);