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
Is your feature request related to a problem? Please describe. 选择Websocket连接方式时,如果与Cqhttp服务器的ws连接断掉,就无法收到消息,必须重启应用。
Describe the solution you'd like 当ws连接断开时,能够有可配置(重试次数,重试策略,Exponential Backoff 之类)的自动重连能力。
The text was updated successfully, but these errors were encountered:
@Dewdrops 我发布了 1.11.0 版本,增加了 retryTimes 和 retryInterval 两个配置项,当 WebSocket 无法连接或异常中断时将每隔一段时间进行重试。你看这样能满足你的需求吗?
retryTimes
retryInterval
Sorry, something went wrong.
@shigma 非常感谢!
我升级到了1.11.0版本,设置
retryTimes: 3, retryInterval: 15000,
但是似乎没有起作用。
重现方法:
过程中没有日志输出,是需要配置日志级别吗?
上面是我这里实测的画面。一开始未启动 CQHTTP,当 Koishi App 运行后再启动,可以看到 Koishi 进行了多次尝试。之后将 CQHTTP 重载,可以看到 Koishi 再次尝试重连成功。
如果你使用的是 koishi 的命令行工具,可以配置 logLevel 为 3。如果你直接进行调用,可以首先设定环境变量 DEBUG=koishi:*。这两种方法都能够看到上面的提示。
感谢耐心解答。
我使用的环境变量加载方法是dotenv,之前应该是调用顺序没注意,DEBUG环境变量没正确设置。 重新测试之后功能一切正常,并且能够看到期望的日志输出。
No branches or pull requests
Is your feature request related to a problem? Please describe.
选择Websocket连接方式时,如果与Cqhttp服务器的ws连接断掉,就无法收到消息,必须重启应用。
Describe the solution you'd like
当ws连接断开时,能够有可配置(重试次数,重试策略,Exponential Backoff 之类)的自动重连能力。
The text was updated successfully, but these errors were encountered: