优化kcp库客户端模式
This commit is contained in:
1 parent
097a324ab0
commit
04134e8087
1 file changed
+4
@@ -936,6 +936,10 @@ func DialWithOptions(raddr string) (*UDPSession, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = conn.SetReadDeadline(time.Time{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if addr.String() != udpaddr.String() {
|
||||
return nil, errors.New("recv packet remote addr not match")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user