1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00

try another way to kill process on windows

This commit is contained in:
Darien Raymond 2018-07-27 12:41:48 +02:00
parent 35762b7b28
commit 4c798584ff
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -113,7 +113,11 @@ func CloseAllServers(servers []*exec.Cmd) {
Content: "Closing all servers.",
})
for _, server := range servers {
server.Process.Signal(syscall.SIGTERM)
if runtime.GOOS == "windows" {
server.Process.Kill()
} else {
server.Process.Signal(syscall.SIGTERM)
}
}
for _, server := range servers {
server.Process.Wait()