From eb4b5ea2339521f09cb2fa7adfaeaf2a44e7ce45 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. PR-URL: https://github.com/nodejs/node/pull/25748 Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina --- doc/api/http.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/http.md b/doc/api/http.md index 7f0b39cbb1cd9a..fc80ca8513355b 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -908,6 +908,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'