kcp: support set mode (#197)

This commit is contained in:
nadoo committed 2020-11-30 20:28:09 +08:00
1 parent e077cb86b4
commit 63112a1509
7 files changed
+43 -25

No files matched your search

+2 -1
View File
@@ -85,7 +85,8 @@ func (pc *PktConn) ReadFrom(b []byte) (int, net.Addr, error) {
}
if pc.tgtAddr == nil {
pc.tgtAddr = tgtAddr
pc.tgtAddr = make([]byte, len(tgtAddr))
copy(pc.tgtAddr, tgtAddr)
}
return n, raddr, err