1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-04 19:14:26 +00:00

Reset the longpoll flag after it's been used once to prevent it restarting work again.

This commit is contained in:
Con Kolivas 2012-02-21 21:56:30 +11:00
parent 2ca8d38e0e
commit 2f3a4a47c8

View File

@ -2130,14 +2130,16 @@ static void test_work_current(struct work *work)
work_block++;
if (work->longpoll)
if (work->longpoll) {
applog(LOG_NOTICE, "LONGPOLL detected new block on network, waiting on fresh work");
else if (have_longpoll)
work->longpoll = false;
} else if (have_longpoll)
applog(LOG_NOTICE, "New block detected on network before longpoll, waiting on fresh work");
else
applog(LOG_NOTICE, "New block detected on network, waiting on fresh work");
restart_threads();
} else if (work->longpoll) {
work->longpoll = false;
applog(LOG_NOTICE, "LONGPOLL requested work restart, waiting on fresh work");
work_block++;
restart_threads();