mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +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);
|
struct pool *pool = select_pool(wc->lagging);
|
||||||
pthread_t get_thread;
|
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);
|
return tq_push(pool->getwork_q, wc);
|
||||||
|
|
||||||
if (unlikely(pthread_create(&get_thread, NULL, get_extra_work, (void *)wc))) {
|
if (unlikely(pthread_create(&get_thread, NULL, get_extra_work, (void *)wc))) {
|
||||||
@ -2242,10 +2242,11 @@ out:
|
|||||||
* any size hardware */
|
* any size hardware */
|
||||||
static bool workio_submit_work(struct workio_cmd *wc)
|
static bool workio_submit_work(struct workio_cmd *wc)
|
||||||
{
|
{
|
||||||
|
struct pool *pool = wc->u.work->pool;
|
||||||
pthread_t submit_thread;
|
pthread_t submit_thread;
|
||||||
|
|
||||||
if (list_empty(&wc->u.work->pool->submit_q->q))
|
if (list_empty(&pool->submit_q->q) || pool->submit_fail)
|
||||||
return tq_push(wc->u.work->pool->submit_q, wc);
|
return tq_push(pool->submit_q, wc);
|
||||||
|
|
||||||
if (unlikely(pthread_create(&submit_thread, NULL, submit_extra_work, (void *)wc))) {
|
if (unlikely(pthread_create(&submit_thread, NULL, submit_extra_work, (void *)wc))) {
|
||||||
applog(LOG_ERR, "Failed to create submit_work_thread");
|
applog(LOG_ERR, "Failed to create submit_work_thread");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user