| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent be7917e commit 6b06c49
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,28 +13,28 @@ if (common.isWindows) { | |||
| 13 | 13 | ||
| 14 | 14 | if (cluster.isMaster) { | |
| 15 | 15 | common.refreshTmpDir(); | |
| 16 | - var worker = cluster.fork(); | ||
| 17 | - worker.on('message', common.mustCall(function(msg) { | ||
| 18 | - assert.equal(msg, 'DONE'); | ||
| 16 | + const worker = cluster.fork(); | ||
| 17 | + worker.on('message', common.mustCall((msg) => { | ||
| 18 | + assert.strictEqual(msg, 'DONE'); | ||
| 19 | 19 | })); | |
| 20 | - worker.on('exit', function() { | ||
| 21 | - process.exit(); | ||
| 22 | - }); | ||
| 20 | + worker.on('exit', common.mustCall(() => {})); | ||
| 23 | 21 | return; | |
| 24 | 22 | } | |
| 25 | 23 | ||
| 26 | - http.createServer(function(req, res) { | ||
| 27 | - assert.equal(req.connection.remoteAddress, undefined); | ||
| 28 | - assert.equal(req.connection.localAddress, undefined); // TODO common.PIPE? | ||
| 24 | + http.createServer(common.mustCall((req, res) => { | ||
| 25 | + assert.strictEqual(req.connection.remoteAddress, undefined); | ||
| 26 | + assert.strictEqual(req.connection.localAddress, undefined); | ||
| 27 | + // TODO common.PIPE? | ||
| 28 | + | ||
| 29 | 29 | res.writeHead(200); | |
| 30 | 30 | res.end('OK'); | |
| 31 | - }).listen(common.PIPE, function() { | ||
| 32 | - http.get({ socketPath: common.PIPE, path: '/' }, function(res) { | ||
| 31 | + })).listen(common.PIPE, common.mustCall(() => { | ||
| 32 | + http.get({ socketPath: common.PIPE, path: '/' }, common.mustCall((res) => { | ||
| 33 | 33 | res.resume(); | |
| 34 | - res.on('end', function(err) { | ||
| 35 | - if (err) throw err; | ||
| 34 | + res.on('end', common.mustCall((err) => { | ||
| 35 | + assert.ifError(err); | ||
| 36 | 36 | process.send('DONE'); | |
| 37 | 37 | process.exit(); | |
| 38 | - }); | ||
| 39 | - }); | ||
| 40 | - }); | ||
| 38 | + })); | ||
| 39 | + })); | ||
| 40 | + })); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments