We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
发现下面的代码在服务端重启时,客户端上报的sn和服务端的rcv_nxt不一致,导致服务端恢复的连接无法read客户端数据。
在代码增加恢复服务端rcv_nxt是否可行呢?(下面代码注释部分)
https://github.com/xtaci/kcp-go/blob/e026777b9cb8afa9ce8a963f3e54ffccaf03f6a1/sess.go#L838C3-L847C4
if s == nil && convRecovered { // new session if len(l.chAccepts) < cap(l.chAccepts) { // do not let the new sessions overwhelm accept queue s := newUDPSession(conv, l.dataShards, l.parityShards, l, l.conn, false, addr, l.block) s.kcpInput(data) // s.kcp.rcv_nxt = sn // 这里可以使恢复的连接继续接受客户端数据 l.sessionLock.Lock() l.sessions[addr.String()] = s l.sessionLock.Unlock() l.chAccepts <- s } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
发现下面的代码在服务端重启时,客户端上报的sn和服务端的rcv_nxt不一致,导致服务端恢复的连接无法read客户端数据。
在代码增加恢复服务端rcv_nxt是否可行呢?(下面代码注释部分)
https://github.com/xtaci/kcp-go/blob/e026777b9cb8afa9ce8a963f3e54ffccaf03f6a1/sess.go#L838C3-L847C4
The text was updated successfully, but these errors were encountered: