mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Avoid curl_easy_cleanup on old curl versions in setup_stratum_curl as well.
This commit is contained in:
parent
220eb85818
commit
c1ec55a6a3
8
util.c
8
util.c
@ -1429,8 +1429,14 @@ static bool setup_stratum_curl(struct pool *pool)
|
|||||||
|
|
||||||
mutex_lock(&pool->stratum_lock);
|
mutex_lock(&pool->stratum_lock);
|
||||||
pool->stratum_active = false;
|
pool->stratum_active = false;
|
||||||
if (pool->stratum_curl)
|
if (pool->stratum_curl) {
|
||||||
|
#if CURL_HAS_KEEPALIVE
|
||||||
curl_easy_cleanup(pool->stratum_curl);
|
curl_easy_cleanup(pool->stratum_curl);
|
||||||
|
#else
|
||||||
|
/* See above in suspend_stratum */
|
||||||
|
CLOSESOCKET(pool->sock);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
pool->stratum_curl = curl_easy_init();
|
pool->stratum_curl = curl_easy_init();
|
||||||
if (unlikely(!pool->stratum_curl))
|
if (unlikely(!pool->stratum_curl))
|
||||||
quit(1, "Failed to curl_easy_init in initiate_stratum");
|
quit(1, "Failed to curl_easy_init in initiate_stratum");
|
||||||
|
Loading…
Reference in New Issue
Block a user