Make the avalon driver return -1 for hash count when usb fails, allowing the main loop code to send it the shutdown flag.
diff --git a/driver-avalon.c b/driver-avalon.c
index e83cfe3..2643c95 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -1503,7 +1503,7 @@ static int64_t avalon_scanhash(struct thr_info *thr)
if (unlikely(avalon->usbinfo.nodev)) {
applog(LOG_ERR, "%s%d: Device disappeared, shutting down thread",
avalon->drv->name, avalon->device_id);
- avalon->shutdown = true;
+ hash_count = -1;
}
/* This hashmeter is just a utility counter based on returned shares */