Skip to content

Commit

Permalink
fix config random port. refs: apache#2382, apache#2384
Browse files Browse the repository at this point in the history
  • Loading branch information
maguowei committed Sep 28, 2023
1 parent d127e50 commit e6d68b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/service_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func (s *ServiceConfig) Export() error {
}

port := proto.Port
if len(proto.Port) == 0 {
if num, err := strconv.Atoi(proto.Port); err != nil || num <= 0 {
port = nextPort.Value.(string)
nextPort = nextPort.Next()
}
Expand Down

0 comments on commit e6d68b3

Please sign in to comment.