Skip to content

Commit

Permalink
Firestore: component_provider.ts: cleanup terminate() functions (#7906)
Browse files Browse the repository at this point in the history
  • Loading branch information
dconeybe committed Jan 2, 2024
1 parent 093e022 commit 97fabd4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/firestore/src/core/component_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,9 @@ export class MemoryOfflineComponentProvider
}

async terminate(): Promise<void> {
if (this.gcScheduler) {
this.gcScheduler.stop();
}
await this.sharedClientState.shutdown();
this.gcScheduler?.stop();
this.indexBackfillerScheduler?.stop();
this.sharedClientState.shutdown();
await this.persistence.shutdown();
}
}
Expand Down Expand Up @@ -485,9 +484,6 @@ export class OnlineComponentProvider {

async terminate(): Promise<void> {
await remoteStoreShutdown(this.remoteStore);

if (this.datastore) {
await this.datastore.terminate();
}
this.datastore?.terminate();
}
}

0 comments on commit 97fabd4

Please sign in to comment.