Skip to content

Commit

Permalink
Merge 6a81761 into 1e78aaf
Browse files Browse the repository at this point in the history
  • Loading branch information
justxuewei authored Aug 15, 2023
2 parents 1e78aaf + 6a81761 commit 568fac1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion config/service_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,12 @@ func (s *ServiceConfig) IsExport() bool {
func getRandomPort(protocolConfigs []*ProtocolConfig) *list.List {
ports := list.New()
for _, proto := range protocolConfigs {
if len(proto.Port) > 0 {
if port, err := strconv.Atoi(proto.Port); err != nil {
logger.Infof(
"%s will be assgined to a random port, since the port is an invalid number",
proto.Name,
)
} else if port > 0 {
continue
}

Expand Down

0 comments on commit 568fac1

Please sign in to comment.