mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 21:10:29 +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)
|
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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user