1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-03-02 19:45:22 -05:00

refactor log and error

This commit is contained in:
Darien Raymond
2017-04-06 21:13:17 +02:00
parent fc31f9b94c
commit 75f5cb9afb
33 changed files with 123 additions and 99 deletions

View File

@@ -16,6 +16,7 @@ import (
"v2ray.com/core"
"v2ray.com/core/app/log"
"v2ray.com/core/common"
"v2ray.com/core/common/errors"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/common/retry"
)
@@ -106,11 +107,11 @@ func GetSourcePath() string {
}
func CloseAllServers() {
log.Info("Closing all servers.")
log.Trace(errors.New("Closing all servers."))
for _, server := range runningServers {
server.Process.Signal(os.Interrupt)
server.Process.Wait()
}
runningServers = make([]*exec.Cmd, 0, 10)
log.Info("All server closed.")
log.Trace(errors.New("All server closed."))
}