test: update test-cluster-disconnect-unshared-udp
Changed var to const PR-URL: https://github.com/nodejs/node/pull/8599 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
This commit is contained in:
parent
daa0f9087a
commit
57b7e85a59
@ -7,11 +7,11 @@ if (common.isWindows) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var cluster = require('cluster');
|
const cluster = require('cluster');
|
||||||
var dgram = require('dgram');
|
const dgram = require('dgram');
|
||||||
|
|
||||||
if (cluster.isMaster) {
|
if (cluster.isMaster) {
|
||||||
var unbound = cluster.fork().on('online', bind);
|
const unbound = cluster.fork().on('online', bind);
|
||||||
|
|
||||||
function bind() {
|
function bind() {
|
||||||
cluster.fork({BOUND: 'y'}).on('listening', disconnect);
|
cluster.fork({BOUND: 'y'}).on('listening', disconnect);
|
||||||
@ -23,7 +23,7 @@ if (cluster.isMaster) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (process.env.BOUND === 'y') {
|
if (process.env.BOUND === 'y') {
|
||||||
var source = dgram.createSocket('udp4');
|
const source = dgram.createSocket('udp4');
|
||||||
|
|
||||||
source.bind(0);
|
source.bind(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user