Browse Source

Do not continue work from a stratum pool where the connection has been interrupted.

Conflicts:
	miner.c
Con Kolivas 13 years ago
parent
commit
230b5f534c
1 changed files with 7 additions and 1 deletions
  1. 7 1
      miner.c

+ 7 - 1
miner.c

@@ -3745,8 +3745,14 @@ bool stale_work(struct work *work, bool share)
 		}
 
 	if (pool->has_stratum && work->job_id) {
-		bool same_job = true;
+		bool same_job;
 
+		if (!pool->stratum_active || !pool->stratum_notify) {
+			applog(LOG_DEBUG, "Work stale due to stratum inactive");
+			return true;
+		}
+
+		same_job = true;
 		mutex_lock(&pool->pool_lock);
 		if (strcmp(work->job_id, pool->swork.job_id))
 			same_job = false;