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)
}
} else {
// no url scheme provided
addr = strings.ToLower(addr)
if strings.HasPrefix(addr, "tcp:") {
addr = addr[4:]
}
a.core.tcp.connect(addr, "")
return nil
return errors.New("invalid peer: " + addr)
}
return nil
}