mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
Fix reset core hanging
This commit is contained in:
parent
8c8dd162d5
commit
f5a8e95dfa
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user