1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-09-13 14:42:05 +00:00

Icarus should timeout if it's greater than the timeout duration even if it's receiving data.

This commit is contained in:
Con Kolivas 2013-05-19 18:34:35 +10:00
parent f4843877d9
commit 4ba6cba86a

View File

@ -349,21 +349,21 @@ static int icarus_get_nonce(struct cgpu_info *icarus, unsigned char *buf, struct
if (amt >= read_amount) if (amt >= read_amount)
return ICA_NONCE_OK; return ICA_NONCE_OK;
rc += SECTOMS(tdiff(&read_finish, &read_start));
if (rc >= read_time) {
if (amt > 0)
applog(LOG_DEBUG, "Icarus Read: Timeout reading for %d ms", rc);
else
applog(LOG_DEBUG, "Icarus Read: No data for %d ms", rc);
return ICA_NONCE_TIMEOUT;
}
if (amt > 0) { if (amt > 0) {
buf += amt; buf += amt;
read_amount -= amt; read_amount -= amt;
first = false; first = false;
continue; continue;
} }
rc += SECTOMS(tdiff(&read_finish, &read_start));
if (rc >= read_time) {
if (opt_debug) {
applog(LOG_DEBUG,
"Icarus Read: No data in %d ms", rc);
}
return ICA_NONCE_TIMEOUT;
}
if (thr && thr->work_restart) { if (thr && thr->work_restart) {
if (opt_debug) { if (opt_debug) {