Browse Source

Bugfix: Assign pool protocol even if longpoll already known

Luke Dashjr 13 years ago
parent
commit
53e245e920
1 changed files with 5 additions and 5 deletions
  1. 5 5
      miner.c

+ 5 - 5
miner.c

@@ -4518,6 +4518,11 @@ badwork:
 		}
 		json_decref(val);
 
+		if (proto != pool->proto) {
+			pool->proto = proto;
+			applog(LOG_INFO, "Selected %s protocol for pool %u", pool_protocol_name(proto), pool->pool_no);
+		}
+
 		if (pool->lp_url)
 			goto out;
 
@@ -4552,11 +4557,6 @@ badwork:
 			if (unlikely(pthread_create(&pool->longpoll_thread, NULL, longpoll_thread, (void *)pool)))
 				quit(1, "Failed to create pool longpoll thread");
 		}
-
-		if (proto != pool->proto) {
-			pool->proto = proto;
-			applog(LOG_INFO, "Selected %s protocol for pool %u", pool_protocol_name(proto), pool->pool_no);
-		}
 	} else if (PLP_NONE != (proto = pool_protocol_fallback(proto))) {
 		goto tryagain;
 	} else {