Fix reset core hanging

This commit is contained in:
Nova 2025-11-29 02:21:54 +03:30
parent 8c8dd162d5
commit f5a8e95dfa
2 changed files with 3 additions and 8 deletions

View File

@ -2500,15 +2500,10 @@ void MainWindow::HotkeyEvent(const QString &key) {
} }
bool MainWindow::StopVPNProcess() { bool MainWindow::StopVPNProcess() {
QMutex waitStop; runOnThread([=, this]
waitStop.lock();
runOnThread([=, this, &waitStop]
{ {
core_process->Kill(); core_process->Kill();
waitStop.unlock(); }, DS_cores, true);
}, DS_cores);
waitStop.lock();
waitStop.unlock();
return true; return true;
} }

View File

@ -512,7 +512,7 @@ void MainWindow::profile_start(int _id) {
int r = msg.exec() - 2; int r = msg.exec() - 2;
if (r == 0) { if (r == 0) {
GetMainWindow()->StopVPNProcess(); StopVPNProcess();
} }
}); });
return false; return false;