Skip to content

Commit

Permalink
Update the documentation of timeout to reflect it controls timeout of…
Browse files Browse the repository at this point in the history
… socket inactivity (request#2728)
  • Loading branch information
odedpeer authored and reconbot committed Nov 23, 2018
1 parent 641527d commit 297e39b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -823,11 +823,12 @@ The first argument can be either a `url` or an `options` object. The only requir
work around this, either use [`request.defaults`](#requestdefaultsoptions)
with your pool options or create the pool object with the `maxSockets`
property outside of the loop.
- `timeout` - integer containing the number of milliseconds to wait for a
server to send response headers (and start the response body) before aborting
the request. Note that if the underlying TCP connection cannot be established,
the OS-wide TCP connection timeout will overrule the `timeout` option ([the
default in Linux can be anywhere from 20-120 seconds][linux-timeout]).
- `timeout` - integer containing number of milliseconds, controls two timeouts
- Time to wait for a server to send response headers (and start the response body) before aborting the request.
Note that if the underlying TCP connection cannot be established,
the OS-wide TCP connection timeout will overrule the `timeout` option ([the
default in Linux can be anywhere from 20-120 seconds][linux-timeout]).
- Sets the socket to timeout after `timeout` milliseconds of inactivity on the socket.

[linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout

Expand Down

0 comments on commit 297e39b

Please sign in to comment.