当Internet连接恢复时,Firestore不会立即开始侦听更改 [英] Firestore doesn't immediately start listening to changes when Internet Connection Resumes

查看:52
本文介绍了当Internet连接恢复时,Firestore不会立即开始侦听更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在没有Internet连接的情况下启动该应用程序,然后打开Internet,则Firestore需要一些时间才能开始监听更改.这种行为可以改变吗?只要互联网连接恢复,它就可以开始侦听更改.

If I start the app without Internet connection, and then turn on internet, Firestore takes some time before it starts listening to changes. Can this behavior be changed? Like can it start listening to changes as soon as Internet connection resumes.

推荐答案

您目前无法控制Firestore SDK如何管理其连接.

You currently don't have any control over how the Firestore SDK manages its connections.

大多数执行重试的代码都是使用指数补偿算法来执行的.这可以防止重试发生得如此之快,以至于损害主机应用程序的性能,并且还可能消耗过多的用户数据计划.但是,这意味着可能需要一些时间才能重新建立连接.

Most code that performs retries do so with an exponential backoff algorithm. This prevents the retries from happening so quickly that it impairs the performance of the host app, and also possibly consuming too much of the user's data plan. However, this means that it may take some time to regain the connection.

这篇关于当Internet连接恢复时,Firestore不会立即开始侦听更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆