Commit 638c8c526f36c0a40c85fadf45707d643e527c9a

Con Kolivas 2012-01-01T14:21:22

Make curl use a fresh connection if the json rpc call fails for any reason in case curl is relying on dead persistent connections.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/util.c b/util.c
index 0657bba..03e9e18 100644
--- a/util.c
+++ b/util.c
@@ -432,6 +432,7 @@ err_out:
 	curl_easy_reset(curl);
 	if (!successful_connect)
 		applog(LOG_DEBUG, "Failed to connect in json_rpc_call");
+	curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1);
 	return NULL;
 }