Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
当浏览器在 WebSocket 的
open事件之前关闭调试握手时,connectingPromise会一直处于 pending,后续 HTTP 请求也随之卡住。另外,连接锁在异步端口发现之后才赋值,并发请求可能各自创建 WebSocket。此修改让整个发现及握手过程共用一个 Promise,通过
finally释放连接锁;握手关闭时拒绝等待,并把事件清理绑定到对应的 socket,避免旧连接事件清空新连接。重连时同时清除 session 级端口防护缓存。验证:新增真实代理子进程回归测试,使用临时浏览器目录、TCP 端口及模拟 WebSocket。首次握手关闭后发起 8 个并发
/targets请求,断言全部成功且仅建立一次重连。无需访问真实浏览器或个人资料。node --test tests/proxy.test.mjs33eef84)复现请求超时。