Browse Source

Merge commit '7d6bcab' into stratum

Luke Dashjr 13 years ago
parent
commit
00db3196bf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      miner.c

+ 2 - 0
miner.c

@@ -5148,6 +5148,8 @@ tryagain:
 	 * and if so, switch to that in preference to getwork if it works */
 	 * and if so, switch to that in preference to getwork if it works */
 	if (pool->stratum_url && stratum_works(pool)) {
 	if (pool->stratum_url && stratum_works(pool)) {
 		applog(LOG_NOTICE, "Switching pool %d %s to %s", pool->pool_no, pool->rpc_url, pool->stratum_url);
 		applog(LOG_NOTICE, "Switching pool %d %s to %s", pool->pool_no, pool->rpc_url, pool->stratum_url);
+		free(pool->rpc_url);
+		pool->rpc_url = strdup(pool->stratum_url);
 		pool->has_stratum = true;
 		pool->has_stratum = true;
 		curl_easy_cleanup(curl);
 		curl_easy_cleanup(curl);