From e629088ec3770c5e26e40563a35d498e4188f02a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 1 Jun 2013 13:11:07 +0800 Subject: [PATCH] Make sure Atom terminates after message is sent. --- src/atom-application.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/atom-application.coffee b/src/atom-application.coffee index 416b05fd1..d0c67ca76 100644 --- a/src/atom-application.coffee +++ b/src/atom-application.coffee @@ -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)