Commit d28a844f61e0630db4ea5fa23dc5063020f3ee53

Con Kolivas 2012-10-29T12:33:25

Shorten the stratum timeout on read to 90 seconds to detect unresponsive pool.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/cgminer.c b/cgminer.c
index 3986caf..92de983 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4323,11 +4323,11 @@ static void *stratum_thread(void *userdata)
 
 		FD_ZERO(&rd);
 		FD_SET(pool->sock, &rd);
-		timeout.tv_sec = 120;
+		timeout.tv_sec = 90;
 		timeout.tv_usec = 0;
 
 		/* The protocol specifies that notify messages should be sent
-		 * every minute so if we fail to receive any for 2 minutes we
+		 * every minute so if we fail to receive any for 90 seconds we
 		 * assume the connection has been dropped and treat this pool
 		 * as dead */
 		select(pool->sock + 1, &rd, NULL, NULL, &timeout);