mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Retry also if the decoding of work fails.
This commit is contained in:
parent
f10f8faefb
commit
73e33c0925
3
main.c
3
main.c
@ -2001,6 +2001,7 @@ static bool get_upstream_work(struct work *work, bool lagging)
|
|||||||
if (opt_debug)
|
if (opt_debug)
|
||||||
applog(LOG_DEBUG, "DBG: sending %s get RPC call: %s", pool->rpc_url, rpc_req);
|
applog(LOG_DEBUG, "DBG: sending %s get RPC call: %s", pool->rpc_url, rpc_req);
|
||||||
|
|
||||||
|
retry:
|
||||||
/* A single failure response here might be reported as a dead pool and
|
/* A single failure response here might be reported as a dead pool and
|
||||||
* there may be temporary denied messages etc. falsely reporting
|
* there may be temporary denied messages etc. falsely reporting
|
||||||
* failure so retry a few times before giving up */
|
* failure so retry a few times before giving up */
|
||||||
@ -2013,6 +2014,8 @@ static bool get_upstream_work(struct work *work, bool lagging)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rc = work_decode(json_object_get(val, "result"), work);
|
rc = work_decode(json_object_get(val, "result"), work);
|
||||||
|
if (!rc && retries < 3)
|
||||||
|
goto retry;
|
||||||
work->pool = pool;
|
work->pool = pool;
|
||||||
total_getworks++;
|
total_getworks++;
|
||||||
pool->getwork_requested++;
|
pool->getwork_requested++;
|
||||||
|
Loading…
Reference in New Issue
Block a user