1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

Make longpoll retry indefinitely to restart as well, or limited by opt_retries.

This commit is contained in:
Con Kolivas 2011-09-27 11:22:43 +10:00
parent 28796de72e
commit 47be27e86b

2
main.c
View File

@ -4573,7 +4573,7 @@ static void *longpoll_thread(void *userdata)
gettimeofday(&end, NULL);
if (end.tv_sec - start.tv_sec > 30)
continue;
if (failures++ < 10) {
if (opt_retries == -1 || failures++ < opt_retries) {
sleep(30);
applog(LOG_WARNING,
"longpoll failed for %s, sleeping for 30s", lp_url);