Skip to content

Commit 5f761e9

Browse files
inversionTrott
authored andcommitted
doc: clarify http timeouts
Socket timeouts set using the `connection` event are replaced by server.keepAliveTimeout when a response is handled.
1 parent 4814987 commit 5f761e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/http.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,10 @@ also be accessed at `request.connection`.
901901
This event can also be explicitly emitted by users to inject connections
902902
into the HTTP server. In that case, any [`Duplex`][] stream can be passed.
903903

904+
If `socket.setTimeout()` is called here, note that the timeout will
905+
be replaced with `server.keepAliveTimeout` when the socket has served
906+
a request (if `server.keepAliveTimeout` is non-zero).
907+
904908
### Event: 'request'
905909
<!-- YAML
906910
added: v0.1.0

0 commit comments

Comments
 (0)