Commit 06bf44b06f074f7ac0a973450cbb0b0da9855a57

Con Kolivas 2012-04-28T13:41:18

Restarting cgminer leads to a socket that can't be bound for 60 seconds, so increase the interval that API binding waits to 30 seconds to minimise the number of times it will retry, spamming the logs.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/api.c b/api.c
index 81e8313..9122302 100644
--- a/api.c
+++ b/api.c
@@ -2246,11 +2246,10 @@ void api(int api_thr_id)
 			if ((time(NULL) - bindstart) > 61)
 				break;
 			else {
-				applog(LOG_WARNING, "API bind to port %d failed - trying again in 15sec", port);
-				sleep(15);
+				applog(LOG_WARNING, "API bind to port %d failed - trying again in 30sec", port);
+				sleep(30);
 			}
-		}
-		else
+		} else
 			bound = 1;
 	}