diff --git a/src/main/mapeo-ipc.js b/src/main/mapeo-ipc.js index debd45854..67aa7282c 100644 --- a/src/main/mapeo-ipc.js +++ b/src/main/mapeo-ipc.js @@ -8,8 +8,9 @@ var handlers = {} handlers.close = async () => { return new Promise((resolve, reject) => { - if (!mapeo) return reject(new Error('oops: mapeo not open')) + if (!mapeo) return resolve() mapeo.close(function (err) { + mapeo = null logger.log('now its done', err) if (err) return reject(err) resolve()