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 27, 2023
1 parent 5ac057d commit ea3d664
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 @@ -271,7 +271,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 ea3d664

Please sign in to comment.