Skip to content
New issue

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

BUG: 适配器如果在 prepare 阶段发生错误 会导致无法继续重连 #307

Closed
502647092 opened this issue Aug 13, 2024 · 0 comments

Comments

@502647092
Copy link
Contributor

502647092 commented Aug 13, 2024

适配器如果在 prepare 阶段发生错误 会导致无法继续重连
例如 QQ 适配器 在这个阶段获取网关地址 但是请求错误之后
后续重连将不会继续进行 因为重连定时任务尚未注册

try {
socket = await this.prepare()
} catch (error) {
logger.warn(error)
return
}

setTimeout(() => {
if (this.getActive()) reconnect()
}, timeout)

大概问题的代码图示

ce0273448057999a7590ec4aa19c243b

@shigma shigma closed this as completed in 345a9c6 Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant