mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
force quit the core on exit
This commit is contained in:
parent
467fcf5331
commit
abd9ce37ef
@ -38,6 +38,14 @@ type server struct {
|
||||
func (s *server) Exit(ctx context.Context, in *gen.EmptyReq) (out *gen.EmptyResp, _ error) {
|
||||
out = &gen.EmptyResp{}
|
||||
|
||||
if needUnsetDNS {
|
||||
needUnsetDNS = false
|
||||
err := sys.SetSystemDNS("Empty", boxInstance.Network().InterfaceMonitor())
|
||||
if err != nil {
|
||||
log.Println("Failed to unset system DNS:", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Connection closed
|
||||
defer os.Exit(0)
|
||||
return
|
||||
|
||||
@ -787,9 +787,6 @@ void MainWindow::prepare_exit()
|
||||
on_commitDataRequest();
|
||||
//
|
||||
NekoGui::dataStore->save_control_no_save = true; // don't change datastore after this line
|
||||
neko_stop(false, true);
|
||||
//
|
||||
sem_stopped.acquire();
|
||||
NekoGui_rpc::defaultClient->Exit();
|
||||
mu_exit.unlock();
|
||||
qDebug() << "prepare exit done!";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user