#328 Added guard to prevent paused message spam and crash.

This commit is contained in:
XMRig 2018-01-10 22:55:45 +07:00
parent 360f0e8ffd
commit e6540229cb

View file

@ -166,8 +166,10 @@ void App::onConsoleCommand(char command)
case 'p':
case 'P':
LOG_INFO(m_options->colors() ? "\x1B[01;33mpaused\x1B[0m, press \x1B[01;35mr\x1B[0m to resume" : "paused, press 'r' to resume");
Workers::setEnabled(false);
if (Workers::isEnabled()) {
LOG_INFO(m_options->colors() ? "\x1B[01;33mpaused\x1B[0m, press \x1B[01;35mr\x1B[0m to resume" : "paused, press 'r' to resume");
Workers::setEnabled(false);
}
break;
case 'r':