5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-26 09:31:38 +00:00

Don't try to correct peers with no schemes in addPeer

This commit is contained in:
Neil Alexander 2018-12-14 17:52:54 +00:00
parent ccf6ce07a4
commit 3ca5f10733
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -515,13 +515,7 @@ func (a *admin) addPeer(addr string, sintf string) error {
return errors.New("invalid peer: " + addr) return errors.New("invalid peer: " + addr)
} }
} else { } else {
// no url scheme provided return errors.New("invalid peer: " + addr)
addr = strings.ToLower(addr)
if strings.HasPrefix(addr, "tcp:") {
addr = addr[4:]
}
a.core.tcp.connect(addr, "")
return nil
} }
return nil return nil
} }