| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -437,7 +437,7 @@ exports.getServiceName = function getServiceName(port, protocol) { | |||
| 437 | 437 | if (matches && matches.length > 1) { | |
| 438 | 438 | serviceName = matches[1]; | |
| 439 | 439 | } | |
| 440 | - } catch(e) { | ||
| 440 | + } catch (e) { | ||
| 441 | 441 | console.error('Cannot read file: ', etcServicesFileName); | |
| 442 | 442 | return undefined; | |
| 443 | 443 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,8 +20,8 @@ repl.addTest('sb(")^$*+?}{|][(.js\\\\", 1)', [ | |||
| 20 | 20 | ||
| 21 | 21 | // continue - the breakpoint should be triggered | |
| 22 | 22 | repl.addTest('c', [ | |
| 23 | - /break in .*[\\\/]mod\.js:23/, | ||
| 24 | - /21/, /22/, /23/, /24/, /25/ | ||
| 23 | + /break in .*[\\\/]mod\.js:23/, | ||
| 24 | + /21/, /22/, /23/, /24/, /25/ | ||
| 25 | 25 | ]); | |
| 26 | 26 | ||
| 27 | 27 | // -- RESTORE BREAKPOINT ON RESTART -- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ var repl = require('./helper-debugger-repl.js'); | |||
| 4 | 4 | ||
| 5 | 5 | repl.startDebugger('breakpoints.js'); | |
| 6 | 6 | var linesWithBreakpoint = [ | |
| 7 | - /1/, /2/, /3/, /4/, /5/, /\* 6/ | ||
| 7 | + /1/, /2/, /3/, /4/, /5/, /\* 6/ | ||
| 8 | 8 | ]; | |
| 9 | 9 | // We slice here, because addTest will change the given array. | |
| 10 | 10 | repl.addTest('sb(6)', linesWithBreakpoint.slice()); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,15 +6,15 @@ function serverHandler(req, res) { | |||
| 6 | 6 | res.connection.destroy(); | |
| 7 | 7 | } | |
| 8 | 8 | ||
| 9 | - var http = require('http'), | ||
| 10 | - weak = require('weak'), | ||
| 11 | - done = 0, | ||
| 12 | - count = 0, | ||
| 13 | - countGC = 0, | ||
| 14 | - todo = 500, | ||
| 15 | - common = require('../common'), | ||
| 16 | - assert = require('assert'), | ||
| 17 | - PORT = common.PORT; | ||
| 9 | + const http = require('http'); | ||
| 10 | + const weak = require('weak'); | ||
| 11 | + const common = require('../common'); | ||
| 12 | + const assert = require('assert'); | ||
| 13 | + const PORT = common.PORT; | ||
| 14 | + const todo = 500; | ||
| 15 | + let done = 0; | ||
| 16 | + let count = 0; | ||
| 17 | + let countGC = 0; | ||
| 18 | 18 | ||
| 19 | 19 | console.log('We should do ' + todo + ' requests'); | |
| 20 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,15 +8,15 @@ function serverHandler(req, res) { | |||
| 8 | 8 | res.end('Hello World\n'); | |
| 9 | 9 | } | |
| 10 | 10 | ||
| 11 | - var http = require('http'), | ||
| 12 | - weak = require('weak'), | ||
| 13 | - done = 0, | ||
| 14 | - count = 0, | ||
| 15 | - countGC = 0, | ||
| 16 | - todo = 500, | ||
| 17 | - common = require('../common'), | ||
| 18 | - assert = require('assert'), | ||
| 19 | - PORT = common.PORT; | ||
| 11 | + const http = require('http'); | ||
| 12 | + const weak = require('weak'); | ||
| 13 | + const common = require('../common'); | ||
| 14 | + const assert = require('assert'); | ||
| 15 | + const PORT = common.PORT; | ||
| 16 | + const todo = 500; | ||
| 17 | + let done = 0; | ||
| 18 | + let count = 0; | ||
| 19 | + let countGC = 0; | ||
| 20 | 20 | ||
| 21 | 21 | console.log('We should do ' + todo + ' requests'); | |
| 22 | 22 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,15 +10,15 @@ function serverHandler(req, res) { | |||
| 10 | 10 | }, 100); | |
| 11 | 11 | } | |
| 12 | 12 | ||
| 13 | - var http = require('http'), | ||
| 14 | - weak = require('weak'), | ||
| 15 | - done = 0, | ||
| 16 | - count = 0, | ||
| 17 | - countGC = 0, | ||
| 18 | - todo = 550, | ||
| 19 | - common = require('../common'), | ||
| 20 | - assert = require('assert'), | ||
| 21 | - PORT = common.PORT; | ||
| 13 | + const http = require('http'); | ||
| 14 | + const weak = require('weak'); | ||
| 15 | + const common = require('../common'); | ||
| 16 | + const assert = require('assert'); | ||
| 17 | + const PORT = common.PORT; | ||
| 18 | + const todo = 550; | ||
| 19 | + let done = 0; | ||
| 20 | + let count = 0; | ||
| 21 | + let countGC = 0; | ||
| 22 | 22 | ||
| 23 | 23 | console.log('We should do ' + todo + ' requests'); | |
| 24 | 24 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,15 +6,15 @@ function serverHandler(req, res) { | |||
| 6 | 6 | res.end('Hello World\n'); | |
| 7 | 7 | } | |
| 8 | 8 | ||
| 9 | - var http = require('http'), | ||
| 10 | - weak = require('weak'), | ||
| 11 | - done = 0, | ||
| 12 | - count = 0, | ||
| 13 | - countGC = 0, | ||
| 14 | - todo = 500, | ||
| 15 | - common = require('../common'), | ||
| 16 | - assert = require('assert'), | ||
| 17 | - PORT = common.PORT; | ||
| 9 | + const http = require('http'); | ||
| 10 | + const weak = require('weak'); | ||
| 11 | + const common = require('../common'); | ||
| 12 | + const assert = require('assert'); | ||
| 13 | + const PORT = common.PORT; | ||
| 14 | + const todo = 500; | ||
| 15 | + let done = 0; | ||
| 16 | + let count = 0; | ||
| 17 | + let countGC = 0; | ||
| 18 | 18 | ||
| 19 | 19 | console.log('We should do ' + todo + ' requests'); | |
| 20 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,15 +17,15 @@ function serverHandler(sock) { | |||
| 17 | 17 | }, 100); | |
| 18 | 18 | } | |
| 19 | 19 | ||
| 20 | - var net = require('net'), | ||
| 21 | - weak = require('weak'), | ||
| 22 | - done = 0, | ||
| 23 | - count = 0, | ||
| 24 | - countGC = 0, | ||
| 25 | - todo = 500, | ||
| 26 | - common = require('../common'), | ||
| 27 | - assert = require('assert'), | ||
| 28 | - PORT = common.PORT; | ||
| 20 | + const net = require('net'); | ||
| 21 | + const weak = require('weak'); | ||
| 22 | + const common = require('../common'); | ||
| 23 | + const assert = require('assert'); | ||
| 24 | + const PORT = common.PORT; | ||
| 25 | + const todo = 500; | ||
| 26 | + let done = 0; | ||
| 27 | + let count = 0; | ||
| 28 | + let countGC = 0; | ||
| 29 | 29 | ||
| 30 | 30 | console.log('We should do ' + todo + ' requests'); | |
| 31 | 31 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,19 +1,19 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - var common = require('../common'), | ||
| 3 | - assert = require('assert'), | ||
| 4 | - dgram = require('dgram'), | ||
| 5 | - util = require('util'), | ||
| 6 | - networkInterfaces = require('os').networkInterfaces(), | ||
| 7 | - Buffer = require('buffer').Buffer, | ||
| 8 | - fork = require('child_process').fork, | ||
| 9 | - LOCAL_BROADCAST_HOST = '255.255.255.255', | ||
| 10 | - TIMEOUT = common.platformTimeout(5000), | ||
| 11 | - messages = [ | ||
| 12 | - new Buffer('First message to send'), | ||
| 13 | - new Buffer('Second message to send'), | ||
| 14 | - new Buffer('Third message to send'), | ||
| 15 | - new Buffer('Fourth message to send') | ||
| 16 | - ]; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + const assert = require('assert'); | ||
| 4 | + const dgram = require('dgram'); | ||
| 5 | + const util = require('util'); | ||
| 6 | + const networkInterfaces = require('os').networkInterfaces(); | ||
| 7 | + const Buffer = require('buffer').Buffer; | ||
| 8 | + const fork = require('child_process').fork; | ||
| 9 | + const LOCAL_BROADCAST_HOST = '255.255.255.255'; | ||
| 10 | + const TIMEOUT = common.platformTimeout(5000); | ||
| 11 | + const messages = [ | ||
| 12 | + new Buffer('First message to send'), | ||
| 13 | + new Buffer('Second message to send'), | ||
| 14 | + new Buffer('Third message to send'), | ||
| 15 | + new Buffer('Fourth message to send') | ||
| 16 | + ]; | ||
| 17 | 17 | ||
| 18 | 18 | if (common.inFreeBSDJail) { | |
| 19 | 19 | console.log('1..0 # Skipped: in a FreeBSD jail'); | |
@@ -34,13 +34,13 @@ get_bindAddress: for (var name in networkInterfaces) { | |||
| 34 | 34 | assert.ok(bindAddress); | |
| 35 | 35 | ||
| 36 | 36 | if (process.argv[2] !== 'child') { | |
| 37 | - var workers = {}, | ||
| 38 | - listeners = 3, | ||
| 39 | - listening = 0, | ||
| 40 | - dead = 0, | ||
| 41 | - i = 0, | ||
| 42 | - done = 0, | ||
| 43 | - timer = null; | ||
| 37 | + const workers = {}; | ||
| 38 | + const listeners = 3; | ||
| 39 | + let listening = 0; | ||
| 40 | + let dead = 0; | ||
| 41 | + let i = 0; | ||
| 42 | + let done = 0; | ||
| 43 | + let timer = null; | ||
| 44 | 44 | ||
| 45 | 45 | //exit the test if it doesn't succeed within TIMEOUT | |
| 46 | 46 | timer = setTimeout(function() { | |
@@ -166,15 +166,21 @@ if (process.argv[2] !== 'child') { | |||
| 166 | 166 | return; | |
| 167 | 167 | } | |
| 168 | 168 | ||
| 169 | - sendSocket.send(buf, 0, buf.length, | ||
| 170 | - common.PORT, LOCAL_BROADCAST_HOST, function(err) { | ||
| 171 | - if (err) throw err; | ||
| 172 | - console.error('[PARENT] sent %s to %s:%s', | ||
| 173 | - util.inspect(buf.toString()), | ||
| 174 | - LOCAL_BROADCAST_HOST, common.PORT); | ||
| 175 | - | ||
| 176 | - process.nextTick(sendSocket.sendNext); | ||
| 177 | - }); | ||
| 169 | + sendSocket.send( | ||
| 170 | + buf, | ||
| 171 | + 0, | ||
| 172 | + buf.length, | ||
| 173 | + common.PORT, | ||
| 174 | + LOCAL_BROADCAST_HOST, | ||
| 175 | + function(err) { | ||
| 176 | + if (err) throw err; | ||
| 177 | + console.error('[PARENT] sent %s to %s:%s', | ||
| 178 | + util.inspect(buf.toString()), | ||
| 179 | + LOCAL_BROADCAST_HOST, common.PORT); | ||
| 180 | + | ||
| 181 | + process.nextTick(sendSocket.sendNext); | ||
| 182 | + } | ||
| 183 | + ); | ||
| 178 | 184 | }; | |
| 179 | 185 | ||
| 180 | 186 | function killChildren(children) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -157,14 +157,20 @@ if (process.argv[2] !== 'child') { | |||
| 157 | 157 | return; | |
| 158 | 158 | } | |
| 159 | 159 | ||
| 160 | - sendSocket.send(buf, 0, buf.length, | ||
| 161 | - common.PORT, LOCAL_BROADCAST_HOST, function(err) { | ||
| 162 | - if (err) throw err; | ||
| 163 | - console.error('[PARENT] sent "%s" to %s:%s', | ||
| 164 | - buf.toString(), | ||
| 165 | - LOCAL_BROADCAST_HOST, common.PORT); | ||
| 166 | - process.nextTick(sendSocket.sendNext); | ||
| 167 | - }); | ||
| 160 | + sendSocket.send( | ||
| 161 | + buf, | ||
| 162 | + 0, | ||
| 163 | + buf.length, | ||
| 164 | + common.PORT, | ||
| 165 | + LOCAL_BROADCAST_HOST, | ||
| 166 | + function(err) { | ||
| 167 | + if (err) throw err; | ||
| 168 | + console.error('[PARENT] sent "%s" to %s:%s', | ||
| 169 | + buf.toString(), | ||
| 170 | + LOCAL_BROADCAST_HOST, common.PORT); | ||
| 171 | + process.nextTick(sendSocket.sendNext); | ||
| 172 | + } | ||
| 173 | + ); | ||
| 168 | 174 | }; | |
| 169 | 175 | } | |
| 170 | 176 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments