1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-29 16:04:33 +00:00

Only clear the longpoll block data if we successfully received a longpoll, and do it before converting the longpoll data to work to avoid the staging thread believing it got the new work before the longpoll.

This commit is contained in:
Con Kolivas 2011-07-18 11:37:33 +10:00
parent 01eb4c599d
commit e532ac354a

2
main.c
View File

@ -1891,6 +1891,7 @@ static void *longpoll_thread(void *userdata)
val = json_rpc_call(curl, lp_url, rpc_userpass, rpc_req,
false, true);
if (likely(val)) {
memcpy(longpoll_block, current_block, 36);
convert_to_work(val);
failures = 0;
json_decref(val);
@ -1922,7 +1923,6 @@ static void *longpoll_thread(void *userdata)
goto out;
}
}
memcpy(longpoll_block, current_block, 36);
}
out: