aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore
diff options
context:
space:
mode:
authorGravatar Sebastian Schmidt <mrschmidt@google.com>2017-12-01 11:48:53 -0800
committerGravatar Sebastian Schmidt <mrschmidt@google.com>2017-12-01 11:54:22 -0800
commit7db1fc5beead336b19f47a56eb4dcc39ec8f4216 (patch)
tree6aaa7beb42b35e014a2610d78e64b4fc093de99b /Firestore
parent47653ce836bb7913cdaf32a4c2bea0b23008e584 (diff)
Ignoring stream messages for closed streams
Diffstat (limited to 'Firestore')
-rw-r--r--Firestore/Source/Remote/FSTStream.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Firestore/Source/Remote/FSTStream.m b/Firestore/Source/Remote/FSTStream.m
index ac51cb9..21b343a 100644
--- a/Firestore/Source/Remote/FSTStream.m
+++ b/Firestore/Source/Remote/FSTStream.m
@@ -542,9 +542,10 @@ static const NSTimeInterval kIdleTimeout = 60.0;
FSTWeakify(self);
[self.workerDispatchQueue dispatchAsync:^{
FSTStrongify(self);
- if (!self || self.state == FSTStreamStateStopped) {
- return;
+ if (!self || ![self isStarted]) {
+ FSTLog(@"%@ Ignoring stream message from inactive stream.", NSStringFromClass([self class]));
}
+
if (!self.messageReceived) {
self.messageReceived = YES;
if ([FIRFirestore isLoggingEnabled]) {