diff options
Diffstat (limited to 'Firestore/Source/Remote/FSTStream.m')
-rw-r--r-- | Firestore/Source/Remote/FSTStream.m | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Firestore/Source/Remote/FSTStream.m b/Firestore/Source/Remote/FSTStream.m index 6cce921..bf54a6b 100644 --- a/Firestore/Source/Remote/FSTStream.m +++ b/Firestore/Source/Remote/FSTStream.m @@ -381,17 +381,17 @@ static const NSTimeInterval kIdleTimeout = 60.0; _messageReceived = NO; _rpc = nil; - // If the caller explicitly requested a stream stop, don't notify them of a closing stream (it - // could trigger undesirable recovery logic, etc.). - if (finalState != FSTStreamStateStopped) { - [self notifyStreamInterruptedWithError:error]; - } - // Clear the delegates to avoid any possible bleed through of events from GRPC. FSTAssert(_delegate, @"closeWithFinalState should only be called for a started stream that has an active " @"delegate."); _delegate = nil; + + // If the caller explicitly requested a stream stop, don't notify them of a closing stream (it + // could trigger undesirable recovery logic, etc.). + if (finalState != FSTStreamStateStopped) { + [self notifyStreamInterruptedWithError:error]; + } } - (void)stop { |