Skip to content

Commit 74d6f2e

Browse files
committed
remote_store.ts: cancel the async task upon shutdown
1 parent a03d5fb commit 74d6f2e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/firestore/src/remote/remote_store.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ export async function remoteStoreShutdown(
283283
): Promise<void> {
284284
const remoteStoreImpl = debugCast(remoteStore, RemoteStoreImpl);
285285
logDebug(LOG_TAG, 'RemoteStore shutting down.');
286+
remoteStoreImpl.sendWriteRequestsOperation?.cancel();
287+
remoteStoreImpl.sendWriteRequestsOperation = null;
286288
remoteStoreImpl.offlineCauses.add(OfflineCause.Shutdown);
287289
await disableNetworkInternal(remoteStoreImpl);
288290
remoteStoreImpl.connectivityMonitor.shutdown();

0 commit comments

Comments
 (0)