Commit 1832b20c40235e3862ddefed7b58f12056a15956

ckolivas 2012-02-04T20:04:07

Revert "Some networks can take a long time to resolve so go back to 60 second timeouts instead of 15." This reverts commit c86a670ce6d264fba10a38f68d65e4b4ab27cba6. This changed more than just the timeout.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/util.c b/util.c
index 03ca034..62abb34 100644
--- a/util.c
+++ b/util.c
@@ -319,7 +319,13 @@ json_t *json_rpc_call(CURL *curl, const char *url,
 	struct header_info hi = { };
 	bool probing = false;
 
-	/* it is assumed that 'curl' is freshly [re]initialised at this pt */
+	/* it is assumed that 'curl' is freshly [re]initialized at this pt */
+
+	if (probe) {
+		probing = !pool->probed;
+		/* Probe for only 15 seconds */
+		timeout = 15;
+	}
 	curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
 
 #if 0 /* Disable curl debugging since it spews to stderr */