Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
4796c7c
stream: make sure 'readable' is emitted before ending the stream
mcollina Feb 11, 2019
0c4e019
src: remove unused variable in node_http2.cc
gengjiawen Mar 2, 2019
93ef1e3
http: check for existance in resetHeadersTimeoutOnReqEnd
mcollina Mar 2, 2019
44ef6b0
src: fix build when NODE_USE_V8_PLATFORM is not defined
nitsakh Mar 1, 2019
f74d5c8
doc: fix the example implementation of MemoryRetainer
joyeecheung Feb 22, 2019
fc6023a
doc: edit deprecation section of Collaborator Guide
Trott Mar 4, 2019
3570c77
test: relax timer check in test-report-uv-handles.js
richardlau Mar 4, 2019
ff1958d
lib: migrate process.binding to internalBinding
BeniCheni Dec 11, 2018
09c83d8
crypto: add KeyObject.asymmetricKeySize
paroga Mar 2, 2019
3e6b95e
src: use the config binding to carry --no-browser-globals
joyeecheung Feb 21, 2019
b435913
src: fix wrong enum reference in node.cc
gengjiawen Mar 4, 2019
21ca939
src: remove unused function in cares_wrap.cc
gengjiawen Mar 4, 2019
4ff5cfa
src: remove redundant cast in string_search.h
gengjiawen Mar 4, 2019
b3ecaaa
tools: replace var to let/const
Mar 2, 2019
a8331fa
tools: add no-var lint rule for tools directory
Mar 6, 2019
3dd7084
build,win: simplify new `msbuild_arg` option
refack Mar 4, 2019
1351f6e
build: indicate that configure has done something
richardlau Mar 4, 2019
7d8edec
buffer: do not affect memory after target for utf16 write
addaleax Mar 4, 2019
4b1c1dc
doc: add missing https Agent maxCachedSessions
nicolas-moteau Mar 4, 2019
bd7e243
doc: standardize on End-of-Life capitalization
Trott Mar 4, 2019
aa80137
tools: update remark-preset-lint-node to 1.5.0
Trott Mar 4, 2019
2d7b629
src: remove redundant call in inspector_io.cc
gengjiawen Mar 4, 2019
539a9c0
src: make parameter name const reference in method TriggerNodeReport
gengjiawen Mar 2, 2019
5d2c522
http: remove unused variable in _http_server.js
gengjiawen Mar 3, 2019
24b9ae1
test: fix tests so they work in worker threads
richardlau Mar 5, 2019
8e94cb2
child_process: fire close event from stdio
koh110 Sep 17, 2018
8c087d2
test: remove usage of `process.binding()`
addaleax Feb 25, 2019
ab1327f
crypto: simplify GetPublicOrPrivateKeyFromJs
tniessen Mar 5, 2019
d1c225f
test: refactor test/report/test-report-signal.js
cjihrig Mar 5, 2019
8c90fe1
Revert "build: silence cpp lint by default"
refack Feb 28, 2019
f37e7bf
tools: fix test.py --shell
hashseed Mar 5, 2019
8439e07
src: remove redundant cast in util-inl.h
gengjiawen Mar 3, 2019
20fdf89
repl: add replDefaults to customize the writer
BridgeAR Jan 19, 2019
cafb332
tools: update dmn to 2.2.1 in update scripts
Trott Mar 6, 2019
dc04dc0
tools: use dmn@2.2.1 to remove unneeded files
Trott Mar 6, 2019
3b06d29
src: remove templating from StreamBase
maclover7 Dec 18, 2018
f0a144e
src: cleanup in all return paths in node::Start
gireeshpunathil Mar 6, 2019
bab6c63
doc: add caveat and tradeoff example to readline
vsemozhetbyt Mar 6, 2019
5de8ed8
doc: add guidance on console output in tests
sam-github Mar 5, 2019
4a913a2
test: bump test-bootstrap-modules.js limit
joyeecheung Mar 8, 2019
cae30d9
doc: edit "Involving the TSC"
Trott Mar 6, 2019
f7ecc94
http: improve for-loop readability in _http_outgoing.js
gengjiawen Mar 3, 2019
14e247e
n-api: improve performance creating strings
anthony-tuininga Mar 4, 2019
28b500f
src: merge debug-only `SealHandleScope`s
addaleax Mar 5, 2019
6a4bb9e
src: delete unused variable in env.h
gengjiawen Mar 5, 2019
cdf0e09
src: delete unused method SetTemplateMethodNoSideEffect
gengjiawen Mar 5, 2019
926649e
src: delete unused method SetTemplateMethod
gengjiawen Mar 5, 2019
8f0a924
tools: update `node-lint-md-cli-rollup` version 2
refack Mar 4, 2019
bda41d8
tools: update generated lint-md.js
refack Mar 4, 2019
feb3a84
src: guard against calling `Init()` multiple times
addaleax Mar 5, 2019
a2511f8
doc: fix nits in writing-tests.md
vsemozhetbyt Mar 9, 2019
ce260c2
test: de-flake test-dns-idna2008.js
refack Mar 6, 2019
7c8bb94
doc: update partner communities link in releases.md
BethGriggs Mar 6, 2019
2b57c65
benchmark,doc,lib,test: capitalize comments
BridgeAR Mar 7, 2019
06c5b84
tools: update capitalized-comments rule
BridgeAR Mar 7, 2019
96d3705
test: rewrite ocsp test to run in parallel
sam-github Mar 5, 2019
f33163a
src: apply clang-tidy various improvement
gengjiawen Mar 6, 2019
0c49ffb
doc: remove tsc-review
Trott Mar 8, 2019
cc32461
test: mark `test-worker-prof` as Flaky on ARM
refack Mar 10, 2019
7dd213f
tools: update to mdast-util-to-hast v3.0.2
rubys Aug 5, 2018
0ba661e
doc: add decode() & encode() methods into querystring.md
ZYSzys Feb 14, 2019
f91dab6
doc: document fake ENOTFOUND as a system error
cjihrig Mar 7, 2019
2eb6a40
report: fix stdout/stderr output formatting
cjihrig Mar 8, 2019
b048a38
test: cover stdout/stderr usage in triggerReport()
cjihrig Mar 8, 2019
70343d0
test: cover triggerReport() failure case
cjihrig Mar 8, 2019
9d77d47
report: rename triggerReport() to writeReport()
cjihrig Mar 8, 2019
2c0c42d
tools: update ESLint to 5.15.1
cjihrig Mar 10, 2019
119adf2
doc: edit Landing Pull Requests
Trott Mar 8, 2019
4a72eb3
doc: add inspector API example for heapdump
sam-github Mar 7, 2019
ca9bb1f
lib,src: remove usage of _externalStream
addaleax Mar 8, 2019
8d9c3fa
worker: remove `ERR_CLOSED_MESSAGE_PORT`
addaleax Mar 7, 2019
8f6b4a9
doc: document diverging MessagePort.onmessage handling
addaleax Mar 10, 2019
9af6631
process: add --pending-deprecation to `process.binding()`
addaleax Feb 25, 2019
d599ada
doc: add version for http.createServer() options addition
benswinburne Dec 12, 2018
1a0602a
crypto: check for invalid chacha20-poly1305 IVs
sam-github Mar 7, 2019
98eb711
doc: edit "Using git-node" section of Guide
Trott Mar 11, 2019
6d90c49
src: rename Init and Start overloads to something more distinctive
joyeecheung Mar 7, 2019
300ad04
test: mark test-worker-prof as flake on all platforms
refack Mar 11, 2019
066fe5a
build: enable v8's siphash for hash seed creation
rvagg Mar 1, 2019
1dd956a
deps,tools: include SipHash in LICENSE
rvagg Mar 1, 2019
b592c2f
test: fix compiler warning in test_string.c
danbev Mar 9, 2019
0ed2a01
src: remove unused variables
cjihrig Mar 11, 2019
8cb7d4b
worker: release native Worker object earlier
addaleax Mar 9, 2019
f2ebf36
url: require encodeStr from internal/querystring
ZYSzys Mar 9, 2019
c43e5b3
lib: import TextEncoder and TextDecoder from `internal/encoding`
joyeecheung Mar 9, 2019
71d0a8a
crypto: fix EdDSA support for KeyObject
mscdex Feb 26, 2019
f03498c
test: fix syntax error in test-dns-idna2008.js when failing
refack Mar 10, 2019
c6536b4
process: make Symbol.toStringTag writable
BridgeAR Mar 7, 2019
348d9a6
http2: `Http2ServerResponse.end()` should always return self
ronag Nov 13, 2018
b581bb0
test: fix test by removing node-inspect/lib/_inspect
BridgeAR Mar 12, 2019
cd77811
http: reduce usage of public util
ZYSzys Mar 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
benchmark,doc,lib,test: capitalize comments
PR-URL: #26483
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
BridgeAR committed Mar 13, 2019
commit 2b57c6555f0a6bbb25b2c5a4174ccbb73b26da38
2 changes: 1 addition & 1 deletion benchmark/_cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function CLI(usage, settings) {
// item arguments
this.items.push(arg);

// the next value must be an item
// The next value must be an item
mode = 'item';
} else {
// Bad case, abort
Expand Down
4 changes: 2 additions & 2 deletions benchmark/net/net-c2s-cork.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// test the speed of .pipe() with sockets
// Test the speed of .pipe() with sockets
'use strict';

const common = require('../common.js');
Expand Down Expand Up @@ -78,7 +78,7 @@ Writer.prototype.write = function(chunk, encoding, cb) {
return true;
};

// doesn't matter, never emits anything.
// Doesn't matter, never emits anything.
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Expand Down
4 changes: 2 additions & 2 deletions benchmark/net/net-c2s.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// test the speed of .pipe() with sockets
// Test the speed of .pipe() with sockets
'use strict';

const common = require('../common.js');
Expand Down Expand Up @@ -72,7 +72,7 @@ Writer.prototype.write = function(chunk, encoding, cb) {
return true;
};

// doesn't matter, never emits anything.
// Doesn't matter, never emits anything.
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Expand Down
4 changes: 2 additions & 2 deletions benchmark/net/net-pipe.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// test the speed of .pipe() with sockets
// Test the speed of .pipe() with sockets
'use strict';

const common = require('../common.js');
Expand Down Expand Up @@ -75,7 +75,7 @@ Writer.prototype.write = function(chunk, encoding, cb) {
return true;
};

// doesn't matter, never emits anything.
// Doesn't matter, never emits anything.
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Expand Down
4 changes: 2 additions & 2 deletions benchmark/net/net-s2c.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// test the speed of .pipe() with sockets
// Test the speed of .pipe() with sockets
'use strict';

const common = require('../common.js');
Expand Down Expand Up @@ -73,7 +73,7 @@ Writer.prototype.write = function(chunk, encoding, cb) {
return true;
};

// doesn't matter, never emits anything.
// Doesn't matter, never emits anything.
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Expand Down
2 changes: 1 addition & 1 deletion benchmark/net/net-wrap-js-stream-passthrough.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Writer.prototype.write = function(chunk, encoding, cb) {
return true;
};

// doesn't matter, never emits anything.
// Doesn't matter, never emits anything.
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Expand Down
4 changes: 2 additions & 2 deletions benchmark/net/tcp-raw-s2c.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
const common = require('../common.js');
const util = require('util');

// if there are dur=N and len=N args, then
// If there are dur=N and len=N args, then
// run the function with those settings.
// if not, then queue up a bunch of child processes.
// If not, then queue up a bunch of child processes.
const bench = common.createBenchmark(main, {
len: [102400, 1024 * 1024 * 16],
type: ['utf', 'asc', 'buf'],
Expand Down
2 changes: 1 addition & 1 deletion benchmark/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if (format === 'csv') {
for (const key of Object.keys(data.conf)) {
conf += ` ${key}=${JSON.stringify(data.conf[key])}`;
}
// delete first space of the configuration
// Delete first space of the configuration
conf = conf.slice(1);
if (format === 'csv') {
// Escape quotes (") for correct csv formatting
Expand Down
6 changes: 3 additions & 3 deletions benchmark/timers/immediate.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function depth1(N) {
}
}

// concurrent setImmediate, 0 arguments
// Concurrent setImmediate, 0 arguments
function breadth(N) {
var n = 0;
bench.start();
Expand All @@ -71,7 +71,7 @@ function breadth(N) {
}
}

// concurrent setImmediate, 1 argument
// Concurrent setImmediate, 1 argument
function breadth1(N) {
var n = 0;
bench.start();
Expand All @@ -85,7 +85,7 @@ function breadth1(N) {
}
}

// concurrent setImmediate, 4 arguments
// Concurrent setImmediate, 4 arguments
function breadth4(N) {
N /= 2;
var n = 0;
Expand Down
2 changes: 1 addition & 1 deletion doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ if (cluster.isMaster) {
res.writeHead(200);
res.end('hello world\n');

// notify master about the request
// Notify master about the request
process.send({ cmd: 'notifyRequest' });
}).listen(8000);
}
Expand Down
4 changes: 2 additions & 2 deletions doc/api/dgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ server.on('listening', () => {
});

server.bind(41234);
// server listening 0.0.0.0:41234
// Prints: server listening 0.0.0.0:41234
```

## Class: dgram.Socket
Expand Down Expand Up @@ -172,7 +172,7 @@ server.on('listening', () => {
});

server.bind(41234);
// server listening 0.0.0.0:41234
// Prints: server listening 0.0.0.0:41234
```

### socket.bind(options[, callback])
Expand Down
2 changes: 1 addition & 1 deletion doc/api/domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ d.on('error', (er) => {
});
d.run(() => {
process.nextTick(() => {
setTimeout(() => { // simulating some various async stuff
setTimeout(() => { // Simulating some various async stuff
fs.open('non-existent file', 'r', (er, fd) => {
if (er) throw er;
// proceed...
Expand Down
6 changes: 3 additions & 3 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const fs = require('fs');

try {
fs.readFile('/some/file/that/does-not-exist', (err, data) => {
// mistaken assumption: throwing here...
// Mistaken assumption: throwing here...
if (err) {
throw err;
}
Expand Down Expand Up @@ -217,7 +217,7 @@ a string representing the location in the code at which
```js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // similar to `new Error().stack`
myObject.stack; // Similar to `new Error().stack`
```

The first line of the trace will be prefixed with
Expand Down Expand Up @@ -316,7 +316,7 @@ will not be present in the stack traces:
const cheetahify = require('./native-binding.node');

function makeFaster() {
// cheetahify *synchronously* calls speedy.
// `cheetahify()` *synchronously* calls speedy.
cheetahify(function speedy() {
throw new Error('oh no!');
});
Expand Down
6 changes: 3 additions & 3 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ console.log(fs.readFileSync('temp.txt', 'utf8'));
// get the file descriptor of the file to be truncated
const fd = fs.openSync('temp.txt', 'r+');

// truncate the file to first four bytes
// Truncate the file to first four bytes
fs.ftruncate(fd, 4, (err) => {
assert.ifError(err);
console.log(fs.readFileSync('temp.txt', 'utf8'));
Expand Down Expand Up @@ -3899,7 +3899,7 @@ async function doTruncate() {
await filehandle.truncate(4);
} finally {
if (filehandle) {
// close the file if it is opened.
// Close the file if it is opened.
await filehandle.close();
}
}
Expand All @@ -3926,7 +3926,7 @@ async function doTruncate() {
await filehandle.truncate(10);
} finally {
if (filehandle) {
// close the file if it is opened.
// Close the file if it is opened.
await filehandle.close();
}
}
Expand Down
10 changes: 5 additions & 5 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ proxy.on('connect', (req, cltSocket, head) => {
// now that proxy is running
proxy.listen(1337, '127.0.0.1', () => {

// make a request to a tunneling proxy
// Make a request to a tunneling proxy
const options = {
port: 1337,
host: '127.0.0.1',
Expand All @@ -387,7 +387,7 @@ proxy.listen(1337, '127.0.0.1', () => {
req.on('connect', (res, socket, head) => {
console.log('got connected!');

// make a request over an HTTP tunnel
// Make a request over an HTTP tunnel
socket.write('GET / HTTP/1.1\r\n' +
'Host: www.google.com:80\r\n' +
'Connection: close\r\n' +
Expand Down Expand Up @@ -1307,7 +1307,7 @@ with any headers passed to [`response.writeHead()`][], with the headers passed
to [`response.writeHead()`][] given precedence.

```js
// returns content-type = text/plain
// Returns content-type = text/plain
const server = http.createServer((req, res) => {
res.setHeader('Content-Type', 'text/html');
res.setHeader('X-Foo', 'bar');
Expand Down Expand Up @@ -1500,7 +1500,7 @@ desired with potential future retrieval and modification, use
[`response.setHeader()`][] instead.

```js
// returns content-type = text/plain
// Returns content-type = text/plain
const server = http.createServer((req, res) => {
res.setHeader('Content-Type', 'text/html');
res.setHeader('X-Foo', 'bar');
Expand Down Expand Up @@ -1912,7 +1912,7 @@ http.get('http://nodejs.org/dist/index.json', (res) => {
}
if (error) {
console.error(error.message);
// consume response data to free up memory
// Consume response data to free up memory
res.resume();
return;
}
Expand Down
4 changes: 2 additions & 2 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3138,7 +3138,7 @@ with any headers passed to [`response.writeHead()`][], with the headers passed
to [`response.writeHead()`][] given precedence.

```js
// returns content-type = text/plain
// Returns content-type = text/plain
const server = http2.createServer((req, res) => {
res.setHeader('Content-Type', 'text/html');
res.setHeader('X-Foo', 'bar');
Expand Down Expand Up @@ -3332,7 +3332,7 @@ with any headers passed to [`response.writeHead()`][], with the headers passed
to [`response.writeHead()`][] given precedence.

```js
// returns content-type = text/plain
// Returns content-type = text/plain
const server = http2.createServer((req, res) => {
res.setHeader('Content-Type', 'text/html');
res.setHeader('X-Foo', 'bar');
Expand Down
2 changes: 1 addition & 1 deletion doc/api/inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ session.post('Profiler.enable', () => {

// some time later...
session.post('Profiler.stop', (err, { profile }) => {
// write profile to disk, upload, etc.
// Write profile to disk, upload, etc.
if (!err) {
fs.writeFileSync('./profile.cpuprofile', JSON.stringify(profile));
}
Expand Down
2 changes: 1 addition & 1 deletion doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ added: v10.12.0
const { createRequireFromPath } = require('module');
const requireUtil = createRequireFromPath('../src/utils');

// require `../src/utils/some-tool`
// Require `../src/utils/some-tool`
requireUtil('./some-tool');
```

Expand Down
2 changes: 1 addition & 1 deletion doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const server = net.createServer((socket) => {
throw err;
});

// grab an arbitrary unused port.
// Grab an arbitrary unused port.
server.listen(() => {
console.log('opened server on', server.address());
});
Expand Down
4 changes: 2 additions & 2 deletions doc/api/perf_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ const {
} = require('perf_hooks');

const obs = new PerformanceObserver((list, observer) => {
// Called three times synchronously. list contains one item
// Called three times synchronously. `list` contains one item.
});
obs.observe({ entryTypes: ['mark'] });

Expand All @@ -346,7 +346,7 @@ const {
} = require('perf_hooks');

const obs = new PerformanceObserver((list, observer) => {
// called once. list contains three items
// Called once. `list` contains three items.
});
obs.observe({ entryTypes: ['mark'], buffered: true });

Expand Down
2 changes: 1 addition & 1 deletion doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ setTimeout(() => {
// [ 1, 552 ]

console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`);
// benchmark took 1000000552 nanoseconds
// Benchmark took 1000000552 nanoseconds
}, 1000);
```

Expand Down
2 changes: 1 addition & 1 deletion doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ For instance: `[[substr1, substr2, ...], originalsubstring]`.
function completer(line) {
const completions = '.help .error .exit .quit .q'.split(' ');
const hits = completions.filter((c) => c.startsWith(line));
// show all completions if none found
// Show all completions if none found
return [hits.length ? hits : completions, line];
}
```
Expand Down
10 changes: 5 additions & 5 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ function writeOneMillionTimes(writer, data, encoding, callback) {
// last time!
writer.write(data, encoding, callback);
} else {
// see if we should continue, or wait
// don't pass the callback, because we're not done yet.
// See if we should continue, or wait.
// Don't pass the callback, because we're not done yet.
ok = writer.write(data, encoding);
}
} while (i > 0 && ok);
Expand Down Expand Up @@ -418,7 +418,7 @@ const fs = require('fs');
const file = fs.createWriteStream('example.txt');
file.write('hello, ');
file.end('world!');
// writing more now is not allowed!
// Writing more now is not allowed!
```

##### writable.setDefaultEncoding(encoding)
Expand Down Expand Up @@ -819,7 +819,7 @@ cause some amount of data to be read into an internal buffer.
```javascript
const readable = getReadableStreamSomehow();
readable.on('readable', function() {
// there is some data to read now
// There is some data to read now
let data;

while (data = this.read()) {
Expand Down Expand Up @@ -2431,7 +2431,7 @@ net.createServer((socket) => {
socket.end('The message was received but was not processed.\n');
});

// start the flow of data, discarding it.
// Start the flow of data, discarding it.
socket.resume();
}).listen(1337);
```
Expand Down
4 changes: 2 additions & 2 deletions lib/_http_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Agent.prototype.addRequest = function addRequest(req, options, port/* legacy */,
var sockLen = freeLen + this.sockets[name].length;

if (freeLen) {
// we have a free socket, so use that.
// We have a free socket, so use that.
var socket = this.freeSockets[name].shift();
// Guard against an uninitialized or user supplied Socket.
if (socket._handle && typeof socket._handle.asyncReset === 'function') {
Expand Down Expand Up @@ -357,7 +357,7 @@ function setRequestSocket(agent, req, socket) {
return;
}
socket.setTimeout(req.timeout);
// reset timeout after response end
// Reset timeout after response end
req.once('response', (res) => {
res.once('end', () => {
if (socket.timeout !== agentTimeout) {
Expand Down
Loading