Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion lib/internal/http/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ Agent.prototype.removeSocket = function removeSocket(s, options) {

// If the socket was destroyed, remove it from the free buffers too.
if (!s.writable)
sets.push(this.freeSockets);
sets[sets.length] = this.freeSockets;

for (let sk = 0; sk < sets.length; sk++) {
const sockets = sets[sk];
Expand Down
6 changes: 3 additions & 3 deletions lib/internal/http/outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ OutgoingMessage.prototype.uncork = function uncork() {
this._send(crlf_buf, null, null);
for (let n = 0; n < buf.length; n += 3) {
this._send(buf[n + 0], buf[n + 1], null);
callbacks.push(buf[n + 2]);
callbacks[callbacks.length] = buf[n + 2];
}
this._send(crlf_buf, null, (err) => {
for (const callback of callbacks) {
Expand Down Expand Up @@ -1300,8 +1300,8 @@ function queueEndCallback(msg, callback) {
process.nextTick(callback, msg[kFlushError]);
return;
}
msg[kEndCallbacks] ??= [];
msg[kEndCallbacks].push(callback);
const callbacks = msg[kEndCallbacks] ??= [];
callbacks[callbacks.length] = callback;
}

function onFinish(outmsg, err) {
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/http/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ function parserOnIncoming(server, socket, state, req, keepAlive) {
}
}

state.incoming.push(req);
state.incoming[state.incoming.length] = req;

// If the writable end isn't consuming, then stop reading
// so that we don't become overwhelmed by a flood of
Expand Down Expand Up @@ -1466,7 +1466,7 @@ function parserOnIncoming(server, socket, state, req, keepAlive) {

if (socket._httpMessage) {
// There are already pending outgoing res, append.
state.outgoing.push(res);
state.outgoing[state.outgoing.length] = res;
} else {
res.assignSocket(socket);
}
Expand Down
Loading