Skip to content
Permalink
Browse files
Restructure a bit based on review
  • Loading branch information
arlolra committed Feb 8, 2020
1 parent 8521571 commit edd53af92ac868cf3ba57988e14de887f088a47b
Showing with 3 additions and 10 deletions.
  1. +3 −10 client/lib/rendezvous.go
@@ -104,17 +104,10 @@ func stripLocalAddresses(str string) string {
for _, a := range m.Attributes {
if a.IsICECandidate() {
ice, err := a.ToICECandidate()
if err != nil {
attrs = append(attrs, a)
continue
}
if ice.Typ == "host" {
if err == nil && ice.Typ == "host" {
ip := net.ParseIP(ice.Address)
if ip == nil {
attrs = append(attrs, a)
continue
}
if IsLocal(ip) || ip.IsUnspecified() || ip.IsLoopback() {
if ip != nil && (IsLocal(ip) || ip.IsUnspecified() || ip.IsLoopback()) {
/* no append in this case */
continue
}
}

0 comments on commit edd53af

Please sign in to comment.