GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — http: allow _httpMessage to be GC'ed · nodejs/node@29c395d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • _http_agent.js
  • test/parallel
    • test-http-connect.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/_http_agent.js‎

Copy file name to clipboardExpand all lines: lib/_http_agent.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ function installListeners(agent, s, options) {
277277
s.removeListener('close', onClose);
278278
s.removeListener('free', onFree);
279279
s.removeListener('agentRemove', onRemove);
280+
s._httpMessage = null;
280281
}
281282
s.on('agentRemove', onRemove);
282283
}
Collapse file

‎test/parallel/test-http-connect.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-connect.js
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ server.listen(0, common.mustCall(() => {
4949
path: 'google.com:443'
5050
}, common.mustNotCall());
5151

52+
req.on('socket', common.mustCall((socket) => {
53+
assert.strictEqual(socket._httpMessage, req);
54+
}));
55+
5256
req.on('close', common.mustCall());
5357

5458
req.on('connect', common.mustCall((res, socket, firstBodyChunk) => {
@@ -60,6 +64,7 @@ server.listen(0, common.mustCall(() => {
6064
// Make sure this socket has detached.
6165
assert(!socket.ondata);
6266
assert(!socket.onend);
67+
assert.strictEqual(socket._httpMessage, null);
6368
assert.strictEqual(socket.listeners('connect').length, 0);
6469
assert.strictEqual(socket.listeners('data').length, 0);
6570

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.