Make sure Atom terminates after message is sent.

This commit is contained in:
Cheng Zhao
2013-06-01 13:11:07 +08:00
parent c36fc467e6
commit e629088ec3

View File

@@ -14,8 +14,9 @@ module.exports =
class AtomApplication
@open: (options) ->
client = net.connect {path: socketPath}, ->
client.write(JSON.stringify(options))
app.terminate()
client.write JSON.stringify(options), ->
client.end()
app.terminate()
client.on 'error', -> new AtomApplication(options)