Move event forwarding back to init

This commit is contained in:
Kevin Sawicki 2015-12-09 18:11:38 -08:00
parent 92433be888
commit fc724b51e8
2 changed files with 6 additions and 7 deletions

View file

@ -51,7 +51,13 @@ process.on 'uncaughtException', (error) ->
message = "Uncaught Exception:\n#{stack}"
dialog.showErrorBox 'A JavaScript error occurred in the main process', message
# Emit a process 'exit' event on app quit.
{app} = require 'electron'
app.on 'quit', (event, exitCode) ->
process.emit 'exit', exitCode
# Map process.exit to app.exit, which quits gracefully.
process.exit = app.exit
# Load the RPC server.
require './rpc-server'