mirror of
https://github.com/libp2p/go-reuseport.git
synced 2025-10-06 07:16:53 +08:00
fix silly if error. Fixes #10
This commit is contained in:
@@ -106,7 +106,7 @@ func dial(dialer net.Dialer, netw, addr string) (c net.Conn, err error) {
|
||||
// check family and protocols match.
|
||||
lfamily = sockaddrnet.NetAddrAF(dialer.LocalAddr)
|
||||
lprotocol = sockaddrnet.NetAddrIPPROTO(dialer.LocalAddr)
|
||||
if lfamily != rfamily && lprotocol != rfamily {
|
||||
if lfamily != rfamily || lprotocol != rprotocol {
|
||||
return nil, &net.AddrError{Err: "unexpected address type", Addr: netAddr.String()}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user