Browse Source

icarus: Allow failure in case of reopen failure, now that the miner core will retry on its own

Luke Dashjr 13 years ago
parent
commit
2c7fc7738b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      driver-icarus.c

+ 3 - 3
driver-icarus.c

@@ -754,7 +754,7 @@ static int64_t icarus_scanhash(struct thr_info *thr, struct work *work,
 
 				}
 				if (info->quirk_reopen == 1 && !icarus_reopen(icarus, state, &fd))
-					return 0;
+					return -1;
 			}
 			
 		}
@@ -764,7 +764,7 @@ static int64_t icarus_scanhash(struct thr_info *thr, struct work *work,
 	}
 	else
 	if (fd == -1 && !icarus_reopen(icarus, state, &fd))
-		return 0;
+		return -1;
 
 #ifndef WIN32
 	tcflush(fd, TCOFLUSH);
@@ -802,7 +802,7 @@ static int64_t icarus_scanhash(struct thr_info *thr, struct work *work,
 	}
 
 	if (info->quirk_reopen == 2 && !icarus_reopen(icarus, state, &fd))
-		return 0;
+		return -1;
 
 	work->blk.nonce = 0xffffffff;