Skip to content

Commit

Permalink
Fix for miner locked if dev fee pool is down.
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanadnan committed Jan 18, 2019
1 parent 367becf commit ae36e2c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cpu-miner.c
Original file line number Diff line number Diff line change
Expand Up @@ -3087,6 +3087,14 @@ void switch_pool(pool_connection_data *pool) {
rpc_userpass = (char *) malloc(strlen(rpc_user) + strlen(rpc_pass) + 2);
if (rpc_userpass)
sprintf(rpc_userpass, "%s:%s", rpc_user, rpc_pass);

if (strcmp(stratum.url, rpc_url)) {
free(stratum.url);
stratum.url = strdup(rpc_url);
applog(LOG_BLUE, "Connection changed to %s", short_url);
} else if (!opt_quiet)
applog(LOG_DEBUG, "Stratum connection reset");

pthread_mutex_unlock(&g_work_lock);

stratum_need_reset = true;
Expand Down

0 comments on commit ae36e2c

Please sign in to comment.