Skip to content

Commit

Permalink
add local addr for kcp dial
Browse files Browse the repository at this point in the history
  • Loading branch information
ginuerzh committed Dec 9, 2018
1 parent a06a29d commit 6ccb6e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (tr *kcpTransporter) Dial(addr string, options ...DialOption) (conn net.Con

session, ok := tr.sessions[addr]
if !ok {
conn, err = net.DialUDP("udp", nil, uaddr)
conn, err = net.DialUDP("udp", &net.UDPAddr{IP: net.IPv4zero}, uaddr)
if err != nil {
return
}
Expand Down

0 comments on commit 6ccb6e5

Please sign in to comment.