Skip to content

Commit 97fabd4

Browse files
authored
Firestore: component_provider.ts: cleanup terminate() functions (#7906)
1 parent 093e022 commit 97fabd4

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/firestore/src/core/component_provider.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,9 @@ export class MemoryOfflineComponentProvider
166166
}
167167

168168
async terminate(): Promise<void> {
169-
if (this.gcScheduler) {
170-
this.gcScheduler.stop();
171-
}
172-
await this.sharedClientState.shutdown();
169+
this.gcScheduler?.stop();
170+
this.indexBackfillerScheduler?.stop();
171+
this.sharedClientState.shutdown();
173172
await this.persistence.shutdown();
174173
}
175174
}
@@ -485,9 +484,6 @@ export class OnlineComponentProvider {
485484

486485
async terminate(): Promise<void> {
487486
await remoteStoreShutdown(this.remoteStore);
488-
489-
if (this.datastore) {
490-
await this.datastore.terminate();
491-
}
487+
this.datastore?.terminate();
492488
}
493489
}

0 commit comments

Comments
 (0)