Browse Source

Reset the work->longpoll flag where it will affect stratum work items as well.

Con Kolivas 13 years ago
parent
commit
16a7962437
1 changed files with 1 additions and 2 deletions
  1. 1 2
      miner.c

+ 1 - 2
miner.c

@@ -4204,7 +4204,6 @@ static bool test_work_current(struct work *work)
 			if (work->longpoll) {
 			if (work->longpoll) {
 				applog(LOG_NOTICE, "LONGPOLL from pool %d detected new block",
 				applog(LOG_NOTICE, "LONGPOLL from pool %d detected new block",
 				       work->pool->pool_no);
 				       work->pool->pool_no);
-				work->longpoll = false;
 			} else if (have_longpoll)
 			} else if (have_longpoll)
 				applog(LOG_NOTICE, "New block detected on network before longpoll");
 				applog(LOG_NOTICE, "New block detected on network before longpoll");
 			else
 			else
@@ -4241,7 +4240,6 @@ static bool test_work_current(struct work *work)
 			}
 			}
 		}
 		}
 	  if (work->longpoll) {
 	  if (work->longpoll) {
-		work->longpoll = false;
 		++work->pool->work_restart_id;
 		++work->pool->work_restart_id;
 		if ((!restart) && work->pool == current_pool()) {
 		if ((!restart) && work->pool == current_pool()) {
 			applog(LOG_NOTICE, "LONGPOLL from pool %d requested work restart",
 			applog(LOG_NOTICE, "LONGPOLL from pool %d requested work restart",
@@ -4252,6 +4250,7 @@ static bool test_work_current(struct work *work)
 		if (restart)
 		if (restart)
 			restart_threads();
 			restart_threads();
 	}
 	}
+	work->longpoll = false;
 out_free:
 out_free:
 	free(hexstr);
 	free(hexstr);
 	return ret;
 	return ret;