File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
src/main/java/com/google/firebase/firestore/remote Expand file tree Collapse file tree 2 files changed +8
-0
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 @@ -211,6 +211,9 @@ public void onClose(Status status) {
211
211
(NetworkStatus networkStatus ) -> {
212
212
workerQueue .enqueueAndForget (
213
213
() -> {
214
+ // Porting Note: Unlike iOS, `restartNetwork()` is called even when the network
215
+ // becomes unreachable as we don't have any other way to tear down our streams.
216
+
214
217
// If the network has been explicitly disabled, make sure we don't accidentally
215
218
// re-enable it.
216
219
if (canUseNetwork ()) {
@@ -277,6 +280,8 @@ private void restartNetwork() {
277
280
networkEnabled = false ;
278
281
disableNetworkInternal ();
279
282
onlineStateTracker .updateState (OnlineState .UNKNOWN );
283
+ writeStream .inhibitBackoff ();
284
+ watchStream .inhibitBackoff ();
280
285
enableNetwork ();
281
286
}
282
287
You can’t perform that action at this time.
0 commit comments