Skip to content

Commit

Permalink
fix: mapeo only needs to close once
Browse files Browse the repository at this point in the history
  • Loading branch information
okdistribute committed Mar 27, 2020
1 parent 6c57568 commit a3bd413
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/mapeo-ipc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a3bd413

Please sign in to comment.