Browse Source

Bugfix: Reset tv_idle on pools after test failure

Luke Dashjr 11 years ago
parent
commit
a4772ead89
1 changed files with 5 additions and 0 deletions
  1. 5 0
      miner.c

+ 5 - 0
miner.c

@@ -8077,7 +8077,10 @@ retry_stratum:
 				init_stratum_thread(pool);
 				init_stratum_thread(pool);
 			}
 			}
 			else
 			else
+			{
 				pool_tclear(pool, &pool->stratum_init);
 				pool_tclear(pool, &pool->stratum_init);
+				pool->tv_idle = tv_getwork_reply;
+			}
 			return ret;
 			return ret;
 		}
 		}
 		return pool->stratum_active;
 		return pool->stratum_active;
@@ -8121,6 +8124,7 @@ badwork:
 			pool->proto = proto = pool_protocol_fallback(proto);
 			pool->proto = proto = pool_protocol_fallback(proto);
 			if (PLP_NONE != proto)
 			if (PLP_NONE != proto)
 				goto tryagain;
 				goto tryagain;
+			pool->tv_idle = tv_getwork_reply;
 			free_work(work);
 			free_work(work);
 			goto out;
 			goto out;
 		}
 		}
@@ -8168,6 +8172,7 @@ badwork:
 		pool->proto = proto;
 		pool->proto = proto;
 		goto tryagain;
 		goto tryagain;
 	} else {
 	} else {
+		pool->tv_idle = tv_getwork_reply;
 		free_work(work);
 		free_work(work);
 nohttp:
 nohttp:
 		/* If we failed to parse a getwork, this could be a stratum
 		/* If we failed to parse a getwork, this could be a stratum