Skip to content

Commit 02fe0e2

Browse files
committed
error out on unrecognized protocol
1 parent 9c84e5a commit 02fe0e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ func (d *Dialer) DialContext(ctx context.Context, remote ma.Multiaddr) (Conn, er
117117
if err != nil {
118118
return nil, err
119119
}
120+
default:
121+
return nil, fmt.Errorf("unrecognized network: %s", rnet)
120122
}
121123

122124
// get local address (pre-specified or assigned within net.Conn)

0 commit comments

Comments
 (0)