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-13 22:44:22 +01:00
1 parent 900de373ae
commit d5059ea537
1 file changed
+2
+2
View File
@@ -1171,6 +1171,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
@@ -1192,6 +1193,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