doc: fix linter issues · nodejs/node@9558c1c

Original file line numberDiff line numberDiff line change

@@ -251,19 +251,19 @@ added: v0.11.4

251251
252252

Produces a socket/stream to be used for HTTP requests.

253253
254-

By default, this function behaves identically to [`net.createConnection(options)`][],

254+

By default, this function behaves identically to [`net.createConnection()`][],

255255

synchronously returning the created socket. The optional `callback` parameter in the

256256

signature is **not** used by this default implementation.

257257
258258

However, custom agents may override this method to provide greater flexibility,

259259

for example, to create sockets asynchronously. When overriding `createConnection`:

260260
261-

1. **Synchronous socket creation**: The overriding method can return the

262-

socket/stream directly.

263-

2. **Asynchronous socket creation**: The overriding method can accept the `callback`

264-

and pass the created socket/stream to it (e.g., `callback(null, newSocket)`).

265-

If an error occurs during socket creation, it should be passed as the first

266-

argument to the `callback` (e.g., `callback(err)`).

261+

1. **Synchronous socket creation**: The overriding method can return the

262+

socket/stream directly.

263+

2. **Asynchronous socket creation**: The overriding method can accept the `callback`

264+

and pass the created socket/stream to it (e.g., `callback(null, newSocket)`).

265+

If an error occurs during socket creation, it should be passed as the first

266+

argument to the `callback` (e.g., `callback(err)`).

267267
268268

The agent will call the provided `createConnection` function with `options` and

269269

this internal `callback`. The `callback` provided by the agent has a signature