Commit f85b85d2442cefb7da87f7ce6a83caf5cdf80189

Con Kolivas 2012-02-19T21:28:23

Re-check for a longpoll supporting pool every 30 seconds if none is found initially.

diff --git a/cgminer.c b/cgminer.c
index a18c503..cec33c4 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -3517,10 +3517,12 @@ static void *longpoll_thread(void *userdata)
 	tq_pop(mythr->q, NULL);
 
 	pool = select_longpoll_pool();
-new_longpoll:
-	if (!pool) {
+	if (!pool)
 		applog(LOG_WARNING, "No long-poll found on any pool server");
-		goto out;
+new_longpoll:
+	while (!pool) {
+		sleep(30);
+		pool = select_longpoll_pool();
 	}
 	hdr_path = pool->hdr_path;
 
diff --git a/miner.h b/miner.h
index acaf3b4..8a41000 100644
--- a/miner.h
+++ b/miner.h
@@ -536,6 +536,7 @@ struct pool {
 	bool submit_old;
 
 	char *hdr_path;
+	char *lp_url;
 
 	unsigned int getwork_requested;
 	unsigned int stale_shares;