1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-30 08:24:26 +00:00

Do not attempt to remove the stratum share hash after unsuccessful submission since it may already be removed by clear_stratum_shares.

This commit is contained in:
Con Kolivas 2012-11-18 15:50:04 +11:00
parent d15515bea4
commit 88983306fd

View File

@ -3233,20 +3233,10 @@ static void *submit_work_thread(void *userdata)
if (pool_tclear(pool, &pool->submit_fail)) if (pool_tclear(pool, &pool->submit_fail))
applog(LOG_WARNING, "Pool %d communication resumed, submitting work", pool->pool_no); applog(LOG_WARNING, "Pool %d communication resumed, submitting work", pool->pool_no);
applog(LOG_DEBUG, "Successfully submitted, adding to stratum_shares db"); applog(LOG_DEBUG, "Successfully submitted, adding to stratum_shares db");
} else { } else if (!pool_tset(pool, &pool->submit_fail)) {
applog(LOG_WARNING, "Failed to submit stratum share to pool %d", pool->pool_no); applog(LOG_WARNING, "Pool %d stratum share submission failure", pool->pool_no);
mutex_lock(&sshare_lock); total_ro++;
HASH_DEL(stratum_shares, sshare); pool->remotefail_occasions++;
mutex_unlock(&sshare_lock);
free(sshare);
pool->stale_shares++;
total_stale++;
if (!pool_tset(pool, &pool->submit_fail)) {
total_ro++;
pool->remotefail_occasions++;
applog(LOG_WARNING, "Pool %d share submission failure", pool->pool_no);
}
} }
goto out; goto out;