Closed winjo closed 2 months ago
This PR was not deployed automatically as @winjo does not have access to the Railway project.
In order to get automatic PR deploys, please add @winjo to the project inside the project settings page.
在PtyServiceManagerRemote
类中进行了多个增强,包括添加了PtyServiceOptions
接口以配置重连间隔和套接字超时。构造函数被修改以接受一个可选的options
参数,用于自定义配置。同时实现了套接字超时处理和在套接字关闭时以可配置间隔重连的逻辑。在单元测试中,对传递给injector.get
的参数对象进行了调整,包含socketConnectOpts
以更准确地测试。
文件路径 | 变更摘要 |
---|---|
packages/terminal-next/src/node/pty.manager.remote.ts | 在PtyServiceManagerRemote 类中添加了PtyServiceOptions 接口、disposer 、options 、和debugLog 属性。更新了构造函数以包含可选的options 参数,并实现了套接字超时处理和重连逻辑。 |
packages/terminal-next/tests/node/pty.proxy.test.ts | 修改了传递给injector.get 的useValue 参数,添加了socketConnectOpts 以更准确地测试。 |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
/next
🎉 PR Next publish successful!
3.1.5-next-1720063337.0
@coderabbitai 有这个pr的原因是因为 node.js 的 socket 在 connect 的时候会 hang 住,没有报错也没有任何回调事件,请问这在什么情况下才会出现呢,有什么好的方案吗
[!TIP] For best results, initiate chat on the files or code changes.
@bytemain 有这个 PR 的原因是因为在某些情况下,Node.js 的 socket 在连接过程中可能会出现挂起现象,而不会触发错误或回调事件。这种情况通常发生在以下几种情景:
net
模块的替代品。希望这些信息对您有所帮助。如果您有其他问题或需要进一步的帮助,请随时告知。
Attention: Patch coverage is 51.28205%
with 19 lines
in your changes missing coverage. Please review.
Project coverage is 55.02%. Comparing base (
29de686
) to head (a871d3a
). Report is 2 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
...kages/terminal-next/src/node/pty.manager.remote.ts | 51.28% | 18 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
/next
🎉 PR Next publish successful!
3.1.5-next-1720065119.0
/next
🎉 PR Next publish successful!
3.1.5-next-1720069890.0
/next
🎉 PR Next publish successful!
3.1.5-next-1720152351.0
Types
Background or solution
pty 双容器下 socket 有概率即没有出发 connnect,也没有触发 close,导致终端一致无法 ready,增加一个 timeout 事件
Changelog
Summary by CodeRabbit