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
当UDPSession调用read和write后,重新设置超时时间不会生效。查看sess.go,修改超时时间会调用:notifyReadEvent(),实际上是往s.chReadEvent写一个空结构体。在Read函数里245行,当收到 <-s.chReadEvent 事件后,会进入下一个循环,但这个循环并不会使用新的超时时间。当我把sess.go 201-206行代码放入for循环顶部,似乎可以正常工作。
发现这个问题是因为,我将http服务器传输协议从TCP换成KCP之后,websocket握手会超时,原因是调用http.response.Hijack()会导致阻塞,因为net/http/server.go第729行cr.conn.rwc.SetReadDeadline(aLongTimeAgo)尝试修改udpsession立即超时没有生效。
Hijack无法正常使用会影响http协议升级成其他协议,希望早点修复
The text was updated successfully, but these errors were encountered:
fix for issue: #259
d26364a
Sorry, something went wrong.
No branches or pull requests
当UDPSession调用read和write后,重新设置超时时间不会生效。查看sess.go,修改超时时间会调用:notifyReadEvent(),实际上是往s.chReadEvent写一个空结构体。在Read函数里245行,当收到 <-s.chReadEvent 事件后,会进入下一个循环,但这个循环并不会使用新的超时时间。当我把sess.go 201-206行代码放入for循环顶部,似乎可以正常工作。
发现这个问题是因为,我将http服务器传输协议从TCP换成KCP之后,websocket握手会超时,原因是调用http.response.Hijack()会导致阻塞,因为net/http/server.go第729行cr.conn.rwc.SetReadDeadline(aLongTimeAgo)尝试修改udpsession立即超时没有生效。
Hijack无法正常使用会影响http协议升级成其他协议,希望早点修复
The text was updated successfully, but these errors were encountered: