Commit 47be27e86bbee9d85137bb43486c9e9ca36630c7

Con Kolivas 2011-09-27T11:22:43

Make longpoll retry indefinitely to restart as well, or limited by opt_retries.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/main.c b/main.c
index 1453dbc..4cae027 100644
--- a/main.c
+++ b/main.c
@@ -4573,7 +4573,7 @@ static void *longpoll_thread(void *userdata)
 			gettimeofday(&end, NULL);
 			if (end.tv_sec - start.tv_sec > 30)
 				continue;
-			if (failures++ < 10) {
+			if (opt_retries == -1 || failures++ < opt_retries) {
 				sleep(30);
 				applog(LOG_WARNING,
 					"longpoll failed for %s, sleeping for 30s", lp_url);