Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a9c70ce

Browse filesBrowse files
koushil-mankaliaduh95
authored andcommitted
doc: add missing variable in code snippet
`node:http`' `request.reusedSocket` documentation sample code was referencing an undeclared `agent` identifier. PR-URL: #55478 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 2892d15 commit a9c70ce
Copy full SHA for a9c70ce

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/http.md‎

Copy file name to clipboardExpand all lines: doc/api/http.md
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,7 @@ may run into a 'ECONNRESET' error.
11721172

11731173
```mjs
11741174
import http from 'node:http';
1175+
const agent = new http.Agent({ keepAlive: true });
11751176

11761177
// Server has a 5 seconds keep-alive timeout by default
11771178
http
@@ -1193,6 +1194,7 @@ setInterval(() => {
11931194

11941195
```cjs
11951196
const http = require('node:http');
1197+
const agent = new http.Agent({ keepAlive: true });
11961198

11971199
// Server has a 5 seconds keep-alive timeout by default
11981200
http

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.