fix: loadbalance group npe
This commit is contained in:
parent
fb58595d44
commit
9969e1706e
1 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,10 @@ func parseStrategy(config map[string]any) string {
|
|||
}
|
||||
|
||||
func getKey(metadata *C.Metadata) string {
|
||||
if metadata == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
if metadata.Host != "" {
|
||||
// ip host
|
||||
if ip := net.ParseIP(metadata.Host); ip != nil {
|
||||
|
|
Loading…
Reference in a new issue