mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-04-18 08:43:13 +00:00
error out on unrecognized protocol
This commit is contained in:
parent
9c84e5a32b
commit
02fe0e22ad
2
net.go
2
net.go
@ -117,6 +117,8 @@ func (d *Dialer) DialContext(ctx context.Context, remote ma.Multiaddr) (Conn, er
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("unrecognized network: %s", rnet)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get local address (pre-specified or assigned within net.Conn)
|
// get local address (pre-specified or assigned within net.Conn)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user