diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-03-25 03:29:55 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-03-26 02:07:30 +0400 |
commit | 9352c1988574cbbc8649115007200315d8f79578 (patch) | |
tree | 5df28ed32760fa87322c0cdd301796c047e1580b /lib | |
parent | cfd0dca9ae0c834e91823c59784f697d0559a63b (diff) |
child_process: don't emit same handle twice
It's possible to read multiple messages off the parent/child channel.
When that happens, make sure that recvHandle is cleared after emitting
the first message so it doesn't get emitted twice.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/child_process.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/child_process.js b/lib/child_process.js index 52435913e94..e67615d21b3 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -337,6 +337,7 @@ function setupChannel(target, channel) { var message = JSON.parse(json); handleMessage(target, message, recvHandle); + recvHandle = undefined; start = i + 1; } |