Skip to content

Commit

Permalink
doc: clarify http timeouts
Browse files Browse the repository at this point in the history
Socket timeouts set using the `'connection'` event are replaced by
`server.keepAliveTimeout` when a response is handled.

PR-URL: #25748
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
  • Loading branch information
inversion authored and lpinca committed Feb 9, 2019
1 parent 016c7b9 commit 02601c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,10 @@ also be accessed at `request.connection`.
This event can also be explicitly emitted by users to inject connections
into the HTTP server. In that case, any [`Duplex`][] stream can be passed.

If `socket.setTimeout()` is called here, the timeout will be replaced with
`server.keepAliveTimeout` when the socket has served a request (if
`server.keepAliveTimeout` is non-zero).

### Event: 'request'
<!-- YAML
added: v0.1.0
Expand Down

0 comments on commit 02601c2

Please sign in to comment.