doc: add missing variable in code snippet

`node:http`' `request.reusedSocket` documentation sample code was
referencing an undeclared `agent` identifier.

PR-URL: https://github.com/nodejs/node/pull/55478
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Koushil Mankali authored and Antoine du Hamel committed 2025-11-10 13:30:09 +01:00
1 parent 2892d151d4
commit a9c70cefe8
1 file changed
+2
+2
View File
@@ -1172,6 +1172,7 @@ may run into a 'ECONNRESET' error.
```mjs
import http from 'node:http';
const agent = new http.Agent({ keepAlive: true });
// Server has a 5 seconds keep-alive timeout by default
http
@@ -1193,6 +1194,7 @@ setInterval(() => {
```cjs
const http = require('node:http');
const agent = new http.Agent({ keepAlive: true });
// Server has a 5 seconds keep-alive timeout by default
http