From 19c02610fd07d4f1308f4481f0dfed87d62a511d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 13 Mar 2020 11:32:25 +0100 Subject: [PATCH] electron-main: Use the new shutdown method. --- src/electron-main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/electron-main.js b/src/electron-main.js index 36c7aa9..9c10faf 100644 --- a/src/electron-main.js +++ b/src/electron-main.js @@ -393,6 +393,14 @@ ipcMain.on('seshat', async function(ev, payload) { break; case 'closeEventIndex': + if (eventIndex !== null) { + try { + await eventIndex.shutdown(); + } catch (e) { + sendError(payload.id, e); + return; + } + } eventIndex = null; break;