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 Oct 11, 2023
1 parent cf92f8c commit 6b473d7
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 @@ -262,7 +262,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 6b473d7

Please sign in to comment.