Commit 44c975be65f9ac3d7a83bb661348fbd0021d1d1a

Con Kolivas 2011-07-19T01:39:22

Long timeouts are causing reset connections and longpoll can recover if the connection needs to be restarted, so remove the timeout settings.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/util.c b/util.c
index 02a488e..6357c25 100644
--- a/util.c
+++ b/util.c
@@ -250,7 +250,6 @@ json_t *json_rpc_call(CURL *curl, const char *url,
 	struct curl_slist *headers = NULL;
 	char len_hdr[64], user_agent_hdr[128];
 	char curl_err_str[CURL_ERROR_SIZE];
-	long timeout = longpoll ? (60 * 60) : (60 * 10);
 	struct header_info hi = { };
 	bool lp_scanning = false;
 
@@ -272,7 +271,6 @@ json_t *json_rpc_call(CURL *curl, const char *url,
 	curl_easy_setopt(curl, CURLOPT_READDATA, &upload_data);
 	curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_err_str);
 	curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
-	curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
 	if (lp_scanning) {
 		curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, resp_hdr_cb);
 		curl_easy_setopt(curl, CURLOPT_HEADERDATA, &hi);