From bb3ca610fffedf20ea4e4d34c5ac2499bec415ed Mon Sep 17 00:00:00 2001 From: Beaudan Date: Fri, 14 Dec 2018 10:03:15 +1100 Subject: [PATCH] Cleaned up utilWorker spawning --- preload.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/preload.js b/preload.js index 97c19b59d..c191ca94a 100644 --- a/preload.js +++ b/preload.js @@ -269,8 +269,9 @@ window.LokiAPI = new LokiServer({ window.mnemonic = require('./libloki/mnemonic'); const { WorkerInterface } = require('./js/modules/util_worker_interface'); -const worker = new WorkerInterface(path.join(app.getAppPath(), 'js', 'util_worker.js')); -window.callWorker = (fnName, ...args) => worker.callWorker(fnName, ...args); +const utilWorkerPath = path.join(app.getAppPath(), 'js', 'util_worker.js'); +const utilWorker = new WorkerInterface(utilWorkerPath); +window.callWorker = (fnName, ...args) => utilWorker.callWorker(fnName, ...args); // Linux seems to periodically let the event loop stop, so this is a global workaround setInterval(() => {