|
|
@@ -4750,6 +4750,7 @@ static void stage_work(struct work *work)
|
|
|
{
|
|
|
applog(LOG_DEBUG, "Pushing work from pool %d to hash queue", work->pool->pool_no);
|
|
|
work->work_restart_id = work->pool->work_restart_id;
|
|
|
+ work->pool->last_work_time = time(NULL);
|
|
|
test_work_current(work);
|
|
|
hash_push(work);
|
|
|
}
|
|
|
@@ -6042,9 +6043,9 @@ static bool cnx_needed(struct pool *pool)
|
|
|
if (!cp->has_stratum && (!opt_fail_only || !cp->hdr_path))
|
|
|
return true;
|
|
|
|
|
|
- /* Keep stratum pools alive until at least a minute after their last
|
|
|
- * generated work, to ensure we have a channel for any submissions */
|
|
|
- if (pool->has_stratum && difftime(time(NULL), pool->last_work_time) < 60)
|
|
|
+ /* Keep the connection open to allow any stray shares to be submitted
|
|
|
+ * on switching pools for 2 minutes. */
|
|
|
+ if (difftime(time(NULL), pool->last_work_time) < 120)
|
|
|
return true;
|
|
|
|
|
|
return false;
|
|
|
@@ -8575,7 +8576,6 @@ retry:
|
|
|
pool = altpool;
|
|
|
goto retry;
|
|
|
}
|
|
|
- pool->last_work_time = time(NULL);
|
|
|
gen_stratum_work(pool, work);
|
|
|
applog(LOG_DEBUG, "Generated stratum work");
|
|
|
stage_work(work);
|