aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.m
diff options
context:
space:
mode:
authorGravatar Michael Lehenbauer <mikelehen@gmail.com>2017-10-23 10:10:34 -0700
committerGravatar GitHub <noreply@github.com>2017-10-23 10:10:34 -0700
commitaab276a2c8af805a41aad4d320ed9ae665b4fc1c (patch)
treeccf195b1a4d19207e3ebeb81cba1037fcea93f94 /Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.m
parent033432f37dbd326bd7817a806b72107507a4cfe4 (diff)
Port of fix for b/67042460 (retry more often before considering client offline) (#403)
This ensures FSTRemoteStore always tries to connect at least twice before surfacing an FSTOnlineStateFailed event to external code (which may trigger gets to fail, cached data to be surfaced, etc.).
Diffstat (limited to 'Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.m')
-rw-r--r--Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.m b/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.m
index b4c0b02..b83942b 100644
--- a/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.m
+++ b/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.m
@@ -263,8 +263,10 @@ NS_ASSUME_NONNULL_BEGIN
[NSError errorWithDomain:FIRFirestoreErrorDomain code:errorCode userInfo:userInfo];
[self.datastore failWatchStreamWithError:error];
- // Unlike web, stream should re-open synchronously
- FSTAssert(self.datastore.isWatchStreamOpen, @"Watch stream is open");
+ // Unlike web, stream should re-open synchronously (if we have any listeners)
+ if (self.queryListeners.count > 0) {
+ FSTAssert(self.datastore.isWatchStreamOpen, @"Watch stream is open");
+ }
}
- (NSDictionary<FSTDocumentKey *, FSTBoxedTargetID *> *)currentLimboDocuments {