mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-14 15:11:56 +00:00
We may as well leave one curl still available per pool instead of reaping the last one.
This commit is contained in:
parent
c7bcad653b
commit
3dd1658e1f
@ -4514,6 +4514,8 @@ static void reap_curl(struct pool *pool)
|
|||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
mutex_lock(&pool->pool_lock);
|
mutex_lock(&pool->pool_lock);
|
||||||
list_for_each_entry_safe(ent, iter, &pool->curlring, node) {
|
list_for_each_entry_safe(ent, iter, &pool->curlring, node) {
|
||||||
|
if (pool->curls < 2)
|
||||||
|
break;
|
||||||
if (now.tv_sec - ent->tv.tv_sec > 60) {
|
if (now.tv_sec - ent->tv.tv_sec > 60) {
|
||||||
reaped++;
|
reaped++;
|
||||||
pool->curls--;
|
pool->curls--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user