We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5a20ae commit 5e25389Copy full SHA for 5e25389
intra/ipn/wg/wgconn.go
@@ -615,7 +615,7 @@ func (s *StdNetBind) asEndpoint(ap net.Addr) conn.Endpoint {
615
} else if udp, ok := ap.(*net.UDPAddr); ok {
616
ipp := udp.AddrPort()
617
ep = StdNetEndpoint{ipp, udpaddr(ipp)} // copy udp addr
618
- } else if ipp, err := netip.ParseAddrPort(ap.String()); err != nil {
+ } else if ipp, err := netip.ParseAddrPort(ap.String()); err == nil {
619
ep = StdNetEndpoint{ipp, udpaddr(ipp)}
620
}
621
s.eps[ap] = ep // ep may be zero value
0 commit comments