From 5f49b2f3f9866e4db13d09857eb3b548239cc62e Mon Sep 17 00:00:00 2001 From: Michael Lehenbauer Date: Wed, 21 Mar 2018 14:59:49 -0700 Subject: Fix for b/74749605: Cancel pending backoff operations when closing streams. (#958) Port of https://github.com/firebase/firebase-js-sdk/pull/564. --- Firestore/Source/Util/FSTDispatchQueue.mm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Firestore/Source/Util') diff --git a/Firestore/Source/Util/FSTDispatchQueue.mm b/Firestore/Source/Util/FSTDispatchQueue.mm index 52482df..15d6e7b 100644 --- a/Firestore/Source/Util/FSTDispatchQueue.mm +++ b/Firestore/Source/Util/FSTDispatchQueue.mm @@ -230,11 +230,8 @@ NS_ASSUME_NONNULL_BEGIN block:(void (^)(void))block { // While not necessarily harmful, we currently don't expect to have multiple callbacks with the // same timerID in the queue, so defensively reject them. - // TODO(b/74749605): If a user change happens while offline we can end up with multiple backoff - // callbacks in the dispatch queue. This is non-harmful so I'm just disabling the assert until we - // get that cleaned up. - // FSTAssert(![self containsDelayedCallbackWithTimerID:timerID], - // @"Attempted to schedule multiple callbacks with id %ld", (unsigned long)timerID); + FSTAssert(![self containsDelayedCallbackWithTimerID:timerID], + @"Attempted to schedule multiple callbacks with id %ld", (unsigned long)timerID); FSTDelayedCallback *delayedCallback = [FSTDelayedCallback createAndScheduleWithQueue:self timerID:timerID delay:delay -- cgit v1.2.3