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

优化 LiveQuery 订阅失败的处理 #656

Open
sdjdd opened this issue Dec 17, 2020 · 0 comments
Open

优化 LiveQuery 订阅失败的处理 #656

sdjdd opened this issue Dec 17, 2020 · 0 comments

Comments

@sdjdd
Copy link
Contributor

sdjdd commented Dec 17, 2020

相关工单: https://www.leanticket.cn/tickets/37018

原因

LiveQueryClient 创建失败(cmd 8 超时)后,realtime._liveQueryClients[subscriptionId] 是一个 Promise(rejected)
后续 realtime 又收到了发往该 client 的命令(啥情况🤔),这里 直接把 Promise 当 LiveQueryClient 用,导致找不到 _dispatchCommand 方法。

可能的优化手段

  • 忽略该命令
  • 产生异常(友好的错误提示)
  • 重新订阅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant