Commit 6ccb6e52 authored by ginuerzh's avatar ginuerzh

add local addr for kcp dial

parent a06a29d1
...@@ -124,7 +124,7 @@ func (tr *kcpTransporter) Dial(addr string, options ...DialOption) (conn net.Con ...@@ -124,7 +124,7 @@ func (tr *kcpTransporter) Dial(addr string, options ...DialOption) (conn net.Con
session, ok := tr.sessions[addr] session, ok := tr.sessions[addr]
if !ok { if !ok {
conn, err = net.DialUDP("udp", nil, uaddr) conn, err = net.DialUDP("udp", &net.UDPAddr{IP: net.IPv4zero}, uaddr)
if err != nil { if err != nil {
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment