Remove code

This commit is contained in:
RMidhunSuresh 2022-08-19 16:31:48 +05:30
parent bfd54f2764
commit 34dd7e4fa5

View File

@ -451,12 +451,6 @@ export class Client {
async deleteSession(log) { async deleteSession(log) {
if (this._sessionId) { if (this._sessionId) {
await log.wrap("sessionStore", async () => {
const storage = this._storage ?? await this._platform.storageFactory.create(this._sessionId, log);
const txn = await storage.readWriteTxn([storage.storeNames.session]);
txn.session.delete();
storage.close();
});
// need to dispose first, so the storage is closed, // need to dispose first, so the storage is closed,
// and also first sync finishing won't call Session.start anymore, // and also first sync finishing won't call Session.start anymore,
// which assumes that the storage works. // which assumes that the storage works.