mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-27 12:05:23 +00:00
Don't try to correct peers with no schemes in addPeer
This commit is contained in:
parent
ccf6ce07a4
commit
3ca5f10733
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user