Commit 624948e246e9565e9a5ef932f4a1cb25b018efb1

Con Kolivas 2012-05-31T09:44:51

Open a longpoll connection if a pool is in the REJECTING state as it's the only way to re-enable it automatically.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/cgminer.c b/cgminer.c
index 42c771e..fac4a04 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4000,8 +4000,14 @@ static struct pool *select_longpoll_pool(struct pool *cp)
 	return NULL;
 }
 
+/* This will make the longpoll thread wait till it's the current pool, or it
+ * has been flagged as rejecting, before attempting to open any connections.
+ */
 static void wait_lpcurrent(struct pool *pool)
 {
+	if (pool->enabled == POOL_REJECTING)
+		return;
+
 	while (pool != current_pool()) {
 		mutex_lock(&lp_lock);
 		pthread_cond_wait(&lp_cond, &lp_lock);