mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
Fix flaky TestVMessDynamicPort (#723)
This commit is contained in:
parent
a149c78a4c
commit
9f9059c7b1
2 changed files with 111 additions and 51 deletions
|
@ -143,6 +143,23 @@ func CloseAllServers(servers []*exec.Cmd) {
|
|||
})
|
||||
}
|
||||
|
||||
func CloseServer(server *exec.Cmd) {
|
||||
log.Record(&log.GeneralMessage{
|
||||
Severity: log.Severity_Info,
|
||||
Content: "Closing server.",
|
||||
})
|
||||
if runtime.GOOS == "windows" {
|
||||
server.Process.Kill()
|
||||
} else {
|
||||
server.Process.Signal(syscall.SIGTERM)
|
||||
}
|
||||
server.Process.Wait()
|
||||
log.Record(&log.GeneralMessage{
|
||||
Severity: log.Severity_Info,
|
||||
Content: "Server closed.",
|
||||
})
|
||||
}
|
||||
|
||||
func withDefaultApps(config *core.Config) *core.Config {
|
||||
config.App = append(config.App, serial.ToTypedMessage(&dispatcher.Config{}))
|
||||
config.App = append(config.App, serial.ToTypedMessage(&proxyman.InboundConfig{}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue