Skip to content

Commit

Permalink
bugfix: panic happened when x-tunnel-server-svc service type is lb (#724
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rambohe-ch authored Jan 26, 2022
1 parent af3b6ba commit b82b5a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/yurttunnel/server/serveraddr/addr.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,10 @@ func GetDefaultDomainsForSvc(ns, name string) []string {

func NodeListToNodes(nodeLst *corev1.NodeList) []*corev1.Node {
nodes := make([]*corev1.Node, 0)
for _, node := range nodeLst.Items {
nodes = append(nodes, &node)
if nodeLst != nil {
for _, node := range nodeLst.Items {
nodes = append(nodes, &node)
}
}
return nodes
}

0 comments on commit b82b5a7

Please sign in to comment.