Skip to content

Commit

Permalink
fix: return port failure (#1995)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Nov 9, 2024
1 parent 5fa5d72 commit 8b4aec9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/apis/rainbond/v1alpha1/third_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func (e EndpointAddress) getIP() string {
return info[0]
}
if len(info) == 3 {
return info[1]
return strings.TrimPrefix(info[1], "//")
}
return ""
}
Expand All @@ -351,6 +351,10 @@ func (e EndpointAddress) GetPort() int {
port, _ := strconv.Atoi(info[1])
return port
}
if len(info) == 3 {
port, _ := strconv.Atoi(info[2])
return port
}
return 0
}

Expand Down

0 comments on commit 8b4aec9

Please sign in to comment.