File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
+ - [ fixed] Removed a delay that may have prevented Firestore from immediately
3
+ reestablishing a network connection if a connectivity change occurred while
4
+ the app was in the background.
2
5
- [ fixed] Fixed an issue that may have prevented the client from connecting
3
6
to the backend immediately after a user signed in.
4
7
Original file line number Diff line number Diff line change @@ -153,8 +153,11 @@ export class RemoteStore implements TargetMetadataProvider {
153
153
connectivityMonitor : ConnectivityMonitor
154
154
) {
155
155
this . connectivityMonitor = connectivityMonitor ;
156
- this . connectivityMonitor . addCallback ( ( status : NetworkStatus ) => {
156
+ this . connectivityMonitor . addCallback ( ( _ : NetworkStatus ) => {
157
157
asyncQueue . enqueueAndForget ( async ( ) => {
158
+ // Porting Note: Unlike iOS, `restartNetwork()` is called even when the
159
+ // network becomes unreachable as we don't have any other way to tear
160
+ // down our streams.
158
161
if ( this . canUseNetwork ( ) ) {
159
162
logDebug (
160
163
LOG_TAG ,
@@ -761,6 +764,8 @@ export class RemoteStore implements TargetMetadataProvider {
761
764
this . offlineCauses . add ( OfflineCause . ConnectivityChange ) ;
762
765
await this . disableNetworkInternal ( ) ;
763
766
this . onlineStateTracker . set ( OnlineState . Unknown ) ;
767
+ this . writeStream . inhibitBackoff ( ) ;
768
+ this . watchStream . inhibitBackoff ( ) ;
764
769
this . offlineCauses . delete ( OfflineCause . ConnectivityChange ) ;
765
770
await this . enableNetworkInternal ( ) ;
766
771
}
You can’t perform that action at this time.
0 commit comments