Commit 1b228ee3d41f320e4f2482773d82ee2a89c090dd

Con Kolivas 2011-08-20T22:39:20

Re-enable devices immediately after ther old threads would have been killed off in case the first attempt to restart them fails but we still want them emabled.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/main.c b/main.c
index 89b99ec..7177255 100644
--- a/main.c
+++ b/main.c
@@ -3982,6 +3982,8 @@ select_cgpu:
 			applog(LOG_WARNING, "Thread %d no longer exists", thr_id);
 	}
 
+	gpu_devices[gpu] = true;
+
 	for (thr_id = 0; thr_id < gpu_threads; thr_id ++) {
 		if (dev_from_id(thr_id) != gpu)
 			continue;
@@ -4016,7 +4018,6 @@ select_cgpu:
 	gettimeofday(&now, NULL);
 	get_datestamp(cgpu->init, &now);
 
-	gpu_devices[gpu] = true;
 	for (thr_id = 0; thr_id < gpu_threads; thr_id ++) {
 		if (dev_from_id(thr_id) != gpu)
 			continue;