Browse Source

Even if we want to submit stale shares, give up if they've failed and we have more submissions waiting on threads

Luke Dashjr 13 years ago
parent
commit
78b2a47c0c
1 changed files with 6 additions and 2 deletions
  1. 6 2
      cgminer.c

+ 6 - 2
cgminer.c

@@ -2284,8 +2284,12 @@ next_submit:
 			kill_work();
 			break;
 		}
-		else if (unlikely(work->stale && opt_retries < 0)) {
-			if (staleexpire <= time(NULL)) {
+		else if (work->stale) {
+			if (unlikely(!list_empty(&submit_waiting))) {
+				applog(LOG_WARNING, "Stale share failed to submit while queued submissions are waiting, discarding");
+				submit_discard_share(work);
+				break;
+			} else if (unlikely(opt_retries < 0 && staleexpire <= time(NULL))) {
 				applog(LOG_NOTICE, "Stale share failed to submit for 5 minutes, discarding");
 				submit_discard_share(work);
 				break;