aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiarhei Siamashka <siarhei.siamashka@gmail.com>2012-02-20 23:56:51 +0200
committerSiarhei Siamashka <siarhei.siamashka@gmail.com>2012-02-20 23:56:51 +0200
commita62cd79b85c69aea5b980f91d2c563b082b06af0 (patch)
treea18467cc341f1458eaae818c6a91aa0203b1c960
parentb690870238b0b468355ec0d5b83c5b43b00f8aa6 (diff)
CURLOPT_NOSIGNAL fix (borrowed from pooler's code)
Prevents the miner from eventually abnormally terminating due to curl misbehaviour.
-rw-r--r--util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.c b/util.c
index b6c3c60..837ede5 100644
--- a/util.c
+++ b/util.c
@@ -225,6 +225,7 @@ json_t *json_rpc_call(CURL *curl, const char *url,
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_ENCODING, "");
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
+ curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 1);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, all_data_cb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &all_data);