We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1279264 commit 0921202Copy full SHA for 0921202
1 file changed
src/vs/platform/storage/browser/storageService.ts
@@ -144,8 +144,10 @@ export class BrowserStorageService extends Disposable implements IStorageService
144
// Signal as event so that clients can still store data
145
this._onWillSaveState.fire({ reason: WillSaveStateReason.SHUTDOWN });
146
147
- // Close DBs
148
- this.globalStorage.close();
149
- this.workspaceStorage.close();
+ // We explicitly do not close our DBs because writing data onBeforeUnload()
+ // can result in unexpected results. Namely, it seems that - even though this
+ // operation is async - sometimes it is being triggered on unload and
150
+ // succeeds. Often though, the DBs turn out to be empty because the write
151
+ // never had a chance to complete.
152
}
153
0 commit comments