diff options
author | Rich Trott <rtrott@gmail.com> | 2016-01-28 23:02:57 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-01-31 18:06:26 -0800 |
commit | 185f8497e5b7138f2ede5d76e3a25933137cef69 (patch) | |
tree | f4d3b6832da0e67394ee00e6e80dc608a3ed2c3a /test/parallel/test-child-process-fork-dgram.js | |
parent | 1800bf4142e77899df30fd7c673c26e7f7c5dcd1 (diff) | |
download | android-node-v8-185f8497e5b7138f2ede5d76e3a25933137cef69.tar.gz android-node-v8-185f8497e5b7138f2ede5d76e3a25933137cef69.tar.bz2 android-node-v8-185f8497e5b7138f2ede5d76e3a25933137cef69.zip |
test: scope redeclared vars in test-child-process*
A handful of child process tests had variables declared multiple times
in the same scope using `var`. This change scopes those declarations.
PR-URL: https://github.com/nodejs/node/pull/4944
Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'test/parallel/test-child-process-fork-dgram.js')
-rw-r--r-- | test/parallel/test-child-process-fork-dgram.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/parallel/test-child-process-fork-dgram.js b/test/parallel/test-child-process-fork-dgram.js index d1e3f3e5d8..b4904c51b1 100644 --- a/test/parallel/test-child-process-fork-dgram.js +++ b/test/parallel/test-child-process-fork-dgram.js @@ -24,9 +24,8 @@ if (common.isWindows) { return; } +var server; if (process.argv[2] === 'child') { - var server; - process.on('message', function removeMe(msg, clusterServer) { if (msg === 'server') { server = clusterServer; @@ -42,7 +41,7 @@ if (process.argv[2] === 'child') { }); } else { - var server = dgram.createSocket('udp4'); + server = dgram.createSocket('udp4'); var client = dgram.createSocket('udp4'); var child = fork(__filename, ['child']); |