Skip to content
Snippets Groups Projects
Commit 5b15c101 authored by 邹毅贤's avatar 邹毅贤
Browse files

fix review comments

parent 9e592847
No related branches found
No related tags found
No related merge requests found
......@@ -116,12 +116,10 @@ func getRandomPort(protocolConfigs []*ProtocolConfig) *list.List {
}
tcp, err := gxnet.ListenOnTCPRandomPort(proto.Ip)
if tcp != nil {
defer tcp.Close()
}
if err != nil {
panic(perrors.New(fmt.Sprintf("Get tcp port error,err is {%v}", err)))
}
defer tcp.Close()
ports.PushBack(strings.Split(tcp.Addr().String(), ":")[1])
}
return ports
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment