mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-18 20:50:09 +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() {
|
||||
QMutex waitStop;
|
||||
waitStop.lock();
|
||||
runOnThread([=, this, &waitStop]
|
||||
runOnThread([=, this]
|
||||
{
|
||||
core_process->Kill();
|
||||
waitStop.unlock();
|
||||
}, DS_cores);
|
||||
waitStop.lock();
|
||||
waitStop.unlock();
|
||||
}, DS_cores, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -512,7 +512,7 @@ void MainWindow::profile_start(int _id) {
|
||||
|
||||
int r = msg.exec() - 2;
|
||||
if (r == 0) {
|
||||
GetMainWindow()->StopVPNProcess();
|
||||
StopVPNProcess();
|
||||
}
|
||||
});
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user