Browse Source

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

nfactor-troky
Con Kolivas 12 years ago
parent
commit
88983306fd
  1. 18
      cgminer.c

18
cgminer.c

@ -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;

Loading…
Cancel
Save