From 3af7528ac399e77eca40b2d00a39afb8dc935b95 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Wed, 19 Dec 2018 14:54:58 +1100 Subject: [PATCH] doc: update the http.request.setTimeout docs to be accurate Refs: https://github.com/nodejs/node/pull/8895 PR-URL: https://github.com/nodejs/node/pull/25123 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- doc/api/http.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index 0ad9f8a2a45ff8..8af25b4e02efb2 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -625,8 +625,9 @@ added: v0.5.9 * `timeout` {number} Milliseconds before a request times out. * `callback` {Function} Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. -Once a socket is assigned to this request and is connected -[`socket.setTimeout()`][] will be called. +If no socket is assigned to this request then [`socket.setTimeout()`][] will be +called immediately. Otherwise [`socket.setTimeout()`][] will be called after the +assigned socket is connected. Returns `request`.