mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
kcp: support set mode (#197)
This commit is contained in:
1 parent
e077cb86b4
commit
63112a1509
7 files changed
+43
-25
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user