Skip to content

Commit d935e84

Browse files
authored
Make RemoveSnapshotsInSyncListener run on the async queue. (#5632)
1 parent 9234d77 commit d935e84

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Firestore/core/src/core/firestore_client.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,9 @@ void FirestoreClient::AddSnapshotsInSyncListener(
499499

500500
void FirestoreClient::RemoveSnapshotsInSyncListener(
501501
const std::shared_ptr<EventListener<Empty>>& user_listener) {
502-
event_manager_->RemoveSnapshotsInSyncListener(user_listener);
502+
worker_queue_->Enqueue([this, user_listener] {
503+
event_manager_->RemoveSnapshotsInSyncListener(user_listener);
504+
});
503505
}
504506

505507
} // namespace core

0 commit comments

Comments
 (0)