mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-25 20:41:36 +00:00
Merge pull request #70 from yggdrasil-network/urlfix
Default to previous scheme when url.Parse returns an error
This commit is contained in:
commit
cf2e112ae8
@ -313,10 +313,7 @@ func (c *Core) DEBUG_maybeSendUDPKeys(saddr string) {
|
||||
|
||||
func (c *Core) DEBUG_addPeer(addr string) {
|
||||
u, err := url.Parse(addr)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if len(u.Opaque) == 0 {
|
||||
if err == nil {
|
||||
switch strings.ToLower(u.Scheme) {
|
||||
case "tcp":
|
||||
c.DEBUG_addTCPConn(u.Host)
|
||||
|
Loading…
Reference in New Issue
Block a user