From a5caf25269a0bcf87181c4f13f652c447aab1c93 Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Mon, 12 Feb 2018 16:36:08 +0300 Subject: [PATCH] fix(macos): fix closing under some platforms --- src/background/background.js | 3 ++- src/background/spider.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/background/background.js b/src/background/background.js index 9aa2f9e..269639d 100644 --- a/src/background/background.js +++ b/src/background/background.js @@ -220,7 +220,8 @@ const startSphinx = (callback) => { }) sphinx.stop = () => { - exec(`${sphinxPath} --config "${config}" --stopwait`) + console.log('sphinx closing...') + exec(`"${sphinxPath}" --config "${config}" --stopwait`) } } diff --git a/src/background/spider.js b/src/background/spider.js index 2bac0d2..75bcca2 100644 --- a/src/background/spider.js +++ b/src/background/spider.js @@ -1039,10 +1039,11 @@ if(config.spaceQuota) } this.stop = (callback) => { - console.log('closing spider') + console.log('spider closing...') torrentClient.destroy(() => { sphinx.end(() => spider.close(() => { mysqlSingle.destroy() + console.log('spider closed') callback() })) })