Skip to content

Commit eb4b5ea

Browse files
inversiontargos
authored andcommitted
doc: clarify http timeouts
Socket timeouts set using the `'connection'` event are replaced by `server.keepAliveTimeout` when a response is handled. PR-URL: #25748 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent a225f99 commit eb4b5ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/http.md

+4
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,10 @@ also be accessed at `request.connection`.
908908
This event can also be explicitly emitted by users to inject connections
909909
into the HTTP server. In that case, any [`Duplex`][] stream can be passed.
910910

911+
If `socket.setTimeout()` is called here, the timeout will be replaced with
912+
`server.keepAliveTimeout` when the socket has served a request (if
913+
`server.keepAliveTimeout` is non-zero).
914+
911915
### Event: 'request'
912916
<!-- YAML
913917
added: v0.1.0

0 commit comments

Comments
 (0)