Skip to content

Commit

Permalink
Remove over-aggressive closeWithFinalState: delegate assert. (firebas…
Browse files Browse the repository at this point in the history
…e#656)

Fixes firebase#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.
  • Loading branch information
mikelehen authored Jan 12, 2018
1 parent dce7641 commit ec29767
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Firestore/Source/Remote/FSTStream.m
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,6 @@ - (void)tearDown {
- (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];
Expand Down

0 comments on commit ec29767

Please sign in to comment.