From fc9a4c3b594c944a8165deb7cc3872b87d5594dd Mon Sep 17 00:00:00 2001 From: Cybwan Date: Sat, 15 Jul 2023 00:02:57 +0800 Subject: [PATCH] fix typo (#21) --- pkg/connector/sink.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/connector/sink.go b/pkg/connector/sink.go index 1b92e238d..01d0305b1 100644 --- a/pkg/connector/sink.go +++ b/pkg/connector/sink.go @@ -226,7 +226,7 @@ func (s *Sink) UpsertEndpoints(key string, raw interface{}) error { } if strings.HasPrefix(k, MeshEndpointAddrAnnotation) { ipIntStr := strings.TrimPrefix(k, fmt.Sprintf("%s-", MeshEndpointAddrAnnotation)) - if ipInt, err := strconv.ParseUint(ipIntStr, 10, 32); err != nil { + if ipInt, err := strconv.ParseUint(ipIntStr, 10, 32); err == nil { ip := utils.Int2IP4(uint32(ipInt)) endpointSubset.Addresses = append(endpointSubset.Addresses, apiv1.EndpointAddress{IP: ip.To4().String()}) }