Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-03-25 03:29:55 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2013-03-26 02:07:30 +0400
commit9352c1988574cbbc8649115007200315d8f79578 (patch)
tree5df28ed32760fa87322c0cdd301796c047e1580b /lib
parentcfd0dca9ae0c834e91823c59784f697d0559a63b (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.js1
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;
}