Skip to content

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

@sdjdd

Description

@sdjdd

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

原因

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

可能的优化手段

  • 忽略该命令
  • 产生异常(友好的错误提示)
  • 重新订阅

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions