From cf36331d815e7b87131d547b92b9ceaa218d114d Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sun, 29 Jul 2012 06:26:23 +0000 Subject: [PATCH] bitforce: Skip out of sending work if work restart requested --- driver-bitforce.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver-bitforce.c b/driver-bitforce.c index 21569486..d187f933 100644 --- a/driver-bitforce.c +++ b/driver-bitforce.c @@ -271,7 +271,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);