Reputation: 33
I can call ref.removeAllObservers() for reading data (such as observeEventType) if I want to stop listening for real time changes. However, i cannot find a way to interrupt and cancel the setValue (writing data). There are some use case which I need to cancel the writing of data while waiting for some time for internet connection to get back online. Is it possible and how?
Upvotes: 1
Views: 807
Reputation: 598728
If there is a write queue, you can empty it by calling FIRDatabase.purgeOutstandingWrites()
.
Upvotes: 4