1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-30 16:34:23 +00:00

Reset the queued count to allow more work to be queued for the new pool on pool switch.

This commit is contained in:
Con Kolivas 2011-07-19 17:00:56 +10:00
parent 0c07328fd4
commit 0d8b8793b5

5
main.c
View File

@ -271,6 +271,11 @@ static void switch_pools(void)
gettimeofday(&currentpool->tv_localgen, NULL); gettimeofday(&currentpool->tv_localgen, NULL);
applog(LOG_WARNING, "Prolonged outage. Attempting to switch to %s", currentpool->rpc_url); applog(LOG_WARNING, "Prolonged outage. Attempting to switch to %s", currentpool->rpc_url);
pthread_mutex_unlock(&control_lock); pthread_mutex_unlock(&control_lock);
/* Reset the queued amount to allow more to be queued for the new pool */
pthread_mutex_lock(&qd_lock);
total_queued = 0;
pthread_mutex_unlock(&qd_lock);
} }
/* FIXME: Use asprintf for better errors. */ /* FIXME: Use asprintf for better errors. */