fix: error should not be ignored when core process is killed

This commit is contained in:
mzz2017 committed 2021-08-10 14:11:29 +08:00
1 parent 921fa29e0b
commit d231beceb0
1 file changed
+3 -5
+3 -5
View File
@@ -50,7 +50,9 @@ func RestartV2rayService(saveStatus bool) (err error) {
return newError("cannot find GFWList files. update GFWList and try again")
}
//关闭transparentProxy,防止v2ray在启动DOH时需要解析域名
_ = killV2ray(saveStatus)
if err = killV2ray(saveStatus); err != nil {
return
}
v2rayBinPath, err := where.GetV2rayBinPath()
if err != nil {
return
@@ -271,10 +273,6 @@ func killV2ray(saveStatus bool) (err error) {
if err != nil {
return
}
_, err = CoreProcess().Wait()
if err != nil {
return
}
if saveStatus {
SetCoreProcess(nil)
}