From 5f761e90f745e358070c92bcec693c2aa653e968 Mon Sep 17 00:00:00 2001 From: Andrew Moss Date: Sun, 27 Jan 2019 23:09:17 +0000 Subject: [PATCH] doc: clarify http timeouts Socket timeouts set using the `connection` event are replaced by server.keepAliveTimeout when a response is handled. --- doc/api/http.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/http.md b/doc/api/http.md index e4474c773a0658..4d4e54303f8890 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -901,6 +901,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, note that the timeout will +be replaced with `server.keepAliveTimeout` when the socket has served +a request (if `server.keepAliveTimeout` is non-zero). + ### Event: 'request'