Do stdin read timeout check only in case no data has been processed

pull/1726/head
Jens Steube 6 years ago
parent d96b649751
commit d4123333c0

@ -285,22 +285,25 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
// stdin read timeout check
if (status_ctx->stdin_read_timeout_cnt >= STDIN_TIMEOUT_MIN)
if (status_get_progress_done (hashcat_ctx) == 0)
{
if (status_ctx->stdin_read_timeout_cnt >= STDIN_TIMEOUT_MAX)
if (status_ctx->stdin_read_timeout_cnt >= STDIN_TIMEOUT_MIN)
{
EVENT_DATA (EVENT_MONITOR_NOINPUT_ABORT, NULL, 0);
if (status_ctx->stdin_read_timeout_cnt >= STDIN_TIMEOUT_MAX)
{
EVENT_DATA (EVENT_MONITOR_NOINPUT_ABORT, NULL, 0);
myabort (hashcat_ctx);
myabort (hashcat_ctx);
status_ctx->shutdown_inner = true;
status_ctx->shutdown_inner = true;
break;
}
break;
}
if ((status_ctx->stdin_read_timeout_cnt % STDIN_TIMEOUT_MIN) == 0)
{
EVENT_DATA (EVENT_MONITOR_NOINPUT_HINT, NULL, 0);
if ((status_ctx->stdin_read_timeout_cnt % STDIN_TIMEOUT_MIN) == 0)
{
EVENT_DATA (EVENT_MONITOR_NOINPUT_HINT, NULL, 0);
}
}
}
}

Loading…
Cancel
Save