optmize start stop

This commit is contained in:
arm64v8a
2023-05-17 10:28:18 +09:00
parent a4b5656dc5
commit 28d2a029da
11 changed files with 254 additions and 75 deletions

View File

@@ -97,12 +97,12 @@ namespace NekoRay::sys {
connect(this, &QProcess::stateChanged, this, [&](QProcess::ProcessState state) {
NekoRay::dataStore->core_running = state == QProcess::Running;
if (!dataStore->core_prepare_exit && state == QProcess::NotRunning) {
if (!dataStore->prepare_exit && state == QProcess::NotRunning) {
if (failed_to_start) return; // no retry
restart_id = NekoRay::dataStore->started_id;
MW_dialog_message("ExternalProcess", "Crashed");
MW_show_log("[Error] core exited, restarting.\n");
MW_show_log("[Error] " + QObject::tr("Core exited, restarting."));
// Restart
setTimeout(