mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
Do not recruit extra connection threads if there have been connection errors to the pool in question.
This commit is contained in:
parent
7638511290
commit
adda6e6680
@ -2080,7 +2080,7 @@ static bool workio_get_work(struct workio_cmd *wc)
|
||||
struct pool *pool = select_pool(wc->lagging);
|
||||
pthread_t get_thread;
|
||||
|
||||
if (list_empty(&pool->getwork_q->q))
|
||||
if (list_empty(&pool->getwork_q->q) || pool->submit_fail)
|
||||
return tq_push(pool->getwork_q, wc);
|
||||
|
||||
if (unlikely(pthread_create(&get_thread, NULL, get_extra_work, (void *)wc))) {
|
||||
@ -2242,10 +2242,11 @@ out:
|
||||
* any size hardware */
|
||||
static bool workio_submit_work(struct workio_cmd *wc)
|
||||
{
|
||||
struct pool *pool = wc->u.work->pool;
|
||||
pthread_t submit_thread;
|
||||
|
||||
if (list_empty(&wc->u.work->pool->submit_q->q))
|
||||
return tq_push(wc->u.work->pool->submit_q, wc);
|
||||
if (list_empty(&pool->submit_q->q) || pool->submit_fail)
|
||||
return tq_push(pool->submit_q, wc);
|
||||
|
||||
if (unlikely(pthread_create(&submit_thread, NULL, submit_extra_work, (void *)wc))) {
|
||||
applog(LOG_ERR, "Failed to create submit_work_thread");
|
||||
|
Loading…
x
Reference in New Issue
Block a user