Skip to content

Commit

Permalink
docs: adjust readme timeout argument description to be clearer (#3115)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredsuttles authored and reconbot committed Feb 26, 2019
1 parent a9557c9 commit 7195b50
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions README.md
Expand Up @@ -823,12 +823,9 @@ 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 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.
- `timeout` - integer containing number of milliseconds, controls two timeouts.
- **Read timeout**: Time to wait for a server to send response headers (and start the response body) before aborting the request.
- **Connection timeout**: Sets the socket to timeout after `timeout` milliseconds of inactivity. Note that increasing the timeout beyond the OS-wide TCP connection timeout will not have any effect ([the default in Linux can be anywhere from 20-120 seconds][linux-timeout])

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

Expand Down

0 comments on commit 7195b50

Please sign in to comment.