From aab276a2c8af805a41aad4d320ed9ae665b4fc1c Mon Sep 17 00:00:00 2001 From: Michael Lehenbauer Date: Mon, 23 Oct 2017 10:10:34 -0700 Subject: 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.). --- Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.m') 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 *)currentLimboDocuments { -- cgit v1.2.3