Commit 72ee48c113fce4f80c0b03a6496179169d1a6339

Con Kolivas 2012-02-15T21:46:59

Merge branch 'master' of github.com:ckolivas/cgminer

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/bitforce.c b/bitforce.c
index e2beba5..7ce195d 100644
--- a/bitforce.c
+++ b/bitforce.c
@@ -39,6 +39,10 @@ static int BFopen(const char *devpath)
 	HANDLE hSerial = CreateFile(devpath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
 	if (unlikely(hSerial == INVALID_HANDLE_VALUE))
 		return -1;
+	
+	COMMTIMEOUTS cto = {30000, 0, 30000, 0, 30000};
+	SetCommTimeouts(hSerial, &cto);
+	
 	return _open_osfhandle((LONG)hSerial, 0);
 #else
 	int fdDev = open(devpath, O_RDWR | O_CLOEXEC | O_NOCTTY);