Browse Source

Since longpoll connections are never reused, explicitly forbid reuse so libcurl cleans them up immediately

Luke Dashjr 11 years ago
parent
commit
24e92e4aab
1 changed files with 1 additions and 0 deletions
  1. 1 0
      miner.c

+ 1 - 0
miner.c

@@ -9524,6 +9524,7 @@ retry_pool:
 		 * so always establish a fresh connection instead of relying on
 		 * a persistent one. */
 		curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1);
+		curl_easy_setopt(curl, CURLOPT_FORBID_REUSE, 1);
 		curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, save_curl_socket);
 		curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, pool);
 		val = json_rpc_call(curl, lp_url, pool->rpc_userpass,