Browse Source

Merge pull request #276 from luke-jr/bf_send_restart

bitforce: Skip out of sending work if work restart requested
Con Kolivas 13 years ago
parent
commit
2fb95c0057
1 changed files with 2 additions and 1 deletions
  1. 2 1
      driver-bitforce.c

+ 2 - 1
driver-bitforce.c

@@ -287,7 +287,8 @@ re_send:
 	BFgets(pdevbuf, sizeof(pdevbuf), fdDev);
 	if (!pdevbuf[0] || !strncasecmp(pdevbuf, "B", 1)) {
 		mutex_unlock(&bitforce->device_mutex);
-		nmsleep(WORK_CHECK_INTERVAL_MS);
+		if (!restart_wait(WORK_CHECK_INTERVAL_MS))
+			return false;
 		goto re_send;
 	} else if (unlikely(strncasecmp(pdevbuf, "OK", 2))) {
 		mutex_unlock(&bitforce->device_mutex);