1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 07:26:24 -05:00

kill server faster

This commit is contained in:
Darien Raymond 2017-04-16 20:55:48 +02:00
parent e064ce65c8
commit c55f737dd0
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -110,6 +110,8 @@ func CloseAllServers() {
log.Trace(errors.New("Closing all servers.")) log.Trace(errors.New("Closing all servers."))
for _, server := range runningServers { for _, server := range runningServers {
server.Process.Signal(os.Interrupt) server.Process.Signal(os.Interrupt)
}
for _, server := range runningServers {
server.Process.Wait() server.Process.Wait()
} }
runningServers = make([]*exec.Cmd, 0, 10) runningServers = make([]*exec.Cmd, 0, 10)