Fix call order when closing sqlite in renderer
This commit is contained in:
parent
a3eed6191e
commit
1a3f87f7f6
1 changed files with 4 additions and 1 deletions
|
@ -307,10 +307,13 @@ async function goBackToMainProcess(): Promise<void> {
|
|||
window.log.info('data.goBackToMainProcess: switching to main process');
|
||||
|
||||
// Close the database in the renderer process.
|
||||
await close();
|
||||
const closePromise = close();
|
||||
|
||||
// It should be the last query we run in renderer process
|
||||
shouldUseRendererProcess = false;
|
||||
|
||||
await closePromise;
|
||||
|
||||
// Print query statistics for whole startup
|
||||
const entries = Array.from(startupQueries.entries());
|
||||
startupQueries.clear();
|
||||
|
|
Loading…
Reference in a new issue