Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #357 from krau612/fix/ledger-worker-not-exiting
Browse files Browse the repository at this point in the history
Exit ledger-worker process on quit signal
  • Loading branch information
luciorubeens committed Oct 26, 2017
2 parents 733d112 + 58b42a8 commit b9061b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ledger-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ setInterval(()=>{
})
}, connected ? 5000:1000)



process.on('message', function (message) {
if (message.quit) {
process.exit()
}
})
3 changes: 3 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ function createWindow () {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
if (ledgerWorker.connected) {
ledgerWorker.send({quit: true})
}
mainWindow = null
})

Expand Down

0 comments on commit b9061b0

Please sign in to comment.