1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-28 23:44:30 +00:00

Merge pull request #88 from midnightmagic/gimme_back_tcp_nodelay

Bring back TCP_NODELAY, selectively when opt_delaynet is disabled only.
This commit is contained in:
Con Kolivas 2012-01-22 01:36:21 -08:00
commit 8b65144934

6
util.c
View File

@ -336,6 +336,9 @@ 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);
if (!opt_delaynet) {
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);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, upload_data_cb);
@ -736,6 +739,9 @@ bool get_dondata(char **url, char **userpass)
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl, CURLOPT_ENCODING, "");
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
if (!opt_delaynet) {
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);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_err_str);