mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-06 12:04:20 +00:00
Ignore the value of stratum_active on calling initiate_stratum and assume we're always trying to reinitiate it, and set the active flag to false in that function.
This commit is contained in:
parent
07605fad60
commit
974f65c67f
@ -4180,7 +4180,6 @@ static void *stratum_thread(void *userdata)
|
|||||||
pool->getfail_occasions++;
|
pool->getfail_occasions++;
|
||||||
total_go++;
|
total_go++;
|
||||||
|
|
||||||
pool->stratum_active = false;
|
|
||||||
if (initiate_stratum(pool) && auth_stratum(pool))
|
if (initiate_stratum(pool) && auth_stratum(pool))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
4
util.c
4
util.c
@ -1217,9 +1217,6 @@ bool initiate_stratum(struct pool *pool)
|
|||||||
json_error_t err;
|
json_error_t err;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
if (pool->stratum_active)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (!pool->stratum_curl) {
|
if (!pool->stratum_curl) {
|
||||||
pool->stratum_curl = curl_easy_init();
|
pool->stratum_curl = curl_easy_init();
|
||||||
if (unlikely(!pool->stratum_curl))
|
if (unlikely(!pool->stratum_curl))
|
||||||
@ -1319,6 +1316,7 @@ out:
|
|||||||
pool->pool_no, pool->nonce1, pool->n2size);
|
pool->pool_no, pool->nonce1, pool->n2size);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
pool->stratum_active = false;
|
||||||
if (curl) {
|
if (curl) {
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
pool->stratum_curl = NULL;
|
pool->stratum_curl = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user