mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
🐛 Wait for connection end to get completed data;
This commit is contained in:
@@ -138,7 +138,11 @@ class AtomApplication
|
||||
return unless @socketPath?
|
||||
@deleteSocketFile()
|
||||
server = net.createServer (connection) =>
|
||||
connection.on 'data', (data) =>
|
||||
data = ''
|
||||
connection.on 'data', (chunk) ->
|
||||
data = data + chunk
|
||||
|
||||
connection.on 'end', =>
|
||||
options = JSON.parse(data)
|
||||
@openWithOptions(options)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user