fix: bugs and issues

This commit is contained in:
Hiddify
2024-03-09 21:07:15 +01:00
parent d05deef499
commit 8ecd0d9644
13 changed files with 79 additions and 60 deletions

View File

@@ -200,7 +200,7 @@ func stop() (CErr *C.char) {
stopAndAlert("Unexpected Error in Stop!", err)
CErr = C.CString(err.Error())
})
config.DeactivateTunnelService()
if v2.CoreState != pb.CoreState_STARTED {
stopAndAlert("Already Stopped", nil)
return C.CString("")
@@ -209,6 +209,7 @@ func stop() (CErr *C.char) {
return C.CString("instance not found")
}
propagateStatus(pb.CoreState_STOPPING)
config.DeactivateTunnelService()
commandServer.SetService(nil)
err := v2.Box.Close()