mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 21:14:37 +03:00
fix: core crashed
This commit is contained in:
@@ -230,6 +230,15 @@ void MainWindow::neko_start(int _id) {
|
||||
}
|
||||
|
||||
auto neko_start_stage2 = [=] {
|
||||
if (!NekoRay::dataStore->core_running) {
|
||||
runOnUiThread(
|
||||
[=] {
|
||||
core_process->Restart();
|
||||
},
|
||||
DS_cores);
|
||||
QThread::sleep(1);
|
||||
}
|
||||
|
||||
#ifndef NKR_NO_GRPC
|
||||
libcore::LoadConfigReq req;
|
||||
req.set_core_config(QJsonObject2QString(result->coreConfig, true).toStdString());
|
||||
@@ -244,6 +253,8 @@ void MainWindow::neko_start(int _id) {
|
||||
if (rpcOK && !error.isEmpty()) {
|
||||
runOnUiThread([=] { MessageBoxWarning("LoadConfig return error", error); });
|
||||
return false;
|
||||
} else if (!rpcOK) {
|
||||
return false;
|
||||
}
|
||||
//
|
||||
NekoRay::traffic::trafficLooper->proxy = result->outboundStat.get();
|
||||
@@ -338,6 +349,8 @@ void MainWindow::neko_stop(bool crash, bool sem) {
|
||||
if (rpcOK && !error.isEmpty()) {
|
||||
runOnUiThread([=] { MessageBoxWarning("Stop return error", error); });
|
||||
return false;
|
||||
} else if (!rpcOK) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user