HTTPUpgrade server: Fix certain stuck in Handle() #5661
Merged
+13
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
这两天莫名其妙卡死 抓包显示 GET 请求发送后响应一个 ACK 就卡死了 我还以为是被墙了 发现只有发送到 httpupgrade 的路径会卡死 其他回复都是正常 后来在VPS端抓包发现VPS收到GET也是响应一个ACK再无响应 随手重启一下发现就好了 连续遇到了两三次 检查代码的时候发现这个 httpupgrade 升级过程竟然是串行阻塞的 只要有一个占着监听器升级流程的连接它就会一直阻塞整个监听器导致其他连接都不能升级 特征就是收到一个 GET 就没有响应了