Commit 8ecf929944021233a374f77b3d2e44a04286ce8b

Con Kolivas 2013-06-04T00:08:59

Check for zero timeout on _usb_write.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/usbutils.c b/usbutils.c
index 0e884d7..257a2ca 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -2288,6 +2288,8 @@ int _usb_write(struct cgpu_info *cgpu, int ep, char *buf, size_t bufsiz, int *pr
 			break;
 
 		timeout = initial_timeout - (done * 1000);
+		if (!timeout)
+			break;
 	}
 
 	*processed = tot;