mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Always use a fresh connection for longpoll as prolonged persistent connections can fail for many reasons.
This commit is contained in:
parent
fa4ce8daf2
commit
17cc279adb
@ -3547,6 +3547,12 @@ new_longpoll:
|
|||||||
json_t *val, *soval;
|
json_t *val, *soval;
|
||||||
|
|
||||||
gettimeofday(&start, NULL);
|
gettimeofday(&start, NULL);
|
||||||
|
|
||||||
|
/* Longpoll connections can be persistent for a very long time
|
||||||
|
* and any number of issues could have come up in the meantime
|
||||||
|
* so always establish a fresh connection instead of relying on
|
||||||
|
* a persistent one. */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1);
|
||||||
val = json_rpc_call(curl, lp_url, pool->rpc_userpass, rpc_req,
|
val = json_rpc_call(curl, lp_url, pool->rpc_userpass, rpc_req,
|
||||||
false, true, &rolltime, pool, false);
|
false, true, &rolltime, pool, false);
|
||||||
if (likely(val)) {
|
if (likely(val)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user