aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Michael Lehenbauer <mikelehen@gmail.com>2018-01-11 17:13:00 -0800
committerGravatar GitHub <noreply@github.com>2018-01-11 17:13:00 -0800
commita8f7e200509b3c5145c4138691549f5bb35f7540 (patch)
tree6827fb8307d5d8ae813fb48b61f2e7c821e95f51
parent4acdbdbdf37024b3734332c79e9594dd0dbc7121 (diff)
Remove over-aggressive closeWithFinalState: delegate assert. (#656)
Fixes #596. closeWithFinalState: asserted delegate != nil, but that is not true if when startWithdelegate: was called we entered backoff (performBackoffWithDelegate:) and so self.delegate did not get assigned yet. We could rework the code to make the assertion hold, but per offline discussion this assert doesn't represent an invariant that we care about maintaining and so I'm just removing it.
-rw-r--r--Firestore/Source/Remote/FSTStream.m3
1 files changed, 0 insertions, 3 deletions
diff --git a/Firestore/Source/Remote/FSTStream.m b/Firestore/Source/Remote/FSTStream.m
index 5719ec8..dc7d01e 100644
--- a/Firestore/Source/Remote/FSTStream.m
+++ b/Firestore/Source/Remote/FSTStream.m
@@ -343,9 +343,6 @@ static const NSTimeInterval kIdleTimeout = 60.0;
- (void)closeWithFinalState:(FSTStreamState)finalState error:(nullable NSError *)error {
FSTAssert(finalState == FSTStreamStateError || error == nil,
@"Can't provide an error when not in an error state.");
- FSTAssert(self.delegate,
- @"closeWithFinalState should only be called for a started stream that has an active "
- @"delegate.");
[self.workerDispatchQueue verifyIsCurrentQueue];
[self cancelIdleCheck];