error out on unrecognized protocol

This commit is contained in:
Jeromy 2016-09-15 19:24:46 -07:00
parent 9c84e5a32b
commit 02fe0e22ad

2
net.go
View File

@ -117,6 +117,8 @@ func (d *Dialer) DialContext(ctx context.Context, remote ma.Multiaddr) (Conn, er
if err != nil {
return nil, err
}
default:
return nil, fmt.Errorf("unrecognized network: %s", rnet)
}
// get local address (pre-specified or assigned within net.Conn)