From ed9287e25522969e36791f1e3124493f6fa63846 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Wed, 13 Dec 2017 10:47:30 -0800 Subject: [PATCH 1/2] doc: value choice for imitating the old behavior of http.Server.keepAliveTimeout Documenting the best way to imitate the old behavior saves time for people migrating from older versions. (E.g. for unexpected ECONNRESET) It isn't immediately obvious if earlier nodejs versions behaved the same way as nodejs 8 does with keepAliveTimeout = 0. From 0aa7ef595084bca35f76cb38e28a0efc7a3128a3, it seems like they behave the same way. Related to issues such as #13391 that show up when migrating to node 8 --- doc/api/http.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index 9f06296e6e2584..27af3edd6a5469 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -900,7 +900,7 @@ added: v0.9.12 The number of milliseconds of inactivity before a socket is presumed to have timed out. -A value of 0 will disable the timeout behavior on incoming connections. +A value of `0` will disable the timeout behavior on incoming connections. *Note*: The socket timeout logic is set up on connection, so changing this value only affects new connections to the server, not any existing connections. @@ -918,7 +918,9 @@ will be destroyed. If the server receives new data before the keep-alive timeout has fired, it will reset the regular inactivity timeout, i.e., [`server.timeout`][]. -A value of 0 will disable the keep-alive timeout behavior on incoming connections. +A value of `0` will disable the keep-alive timeout behavior on incoming connections. +A value of `0` makes the http server behave similarly to earlier Node.js versions, +which did not have a keep-alive timeout. *Note*: The socket timeout logic is set up on connection, so changing this value only affects new connections to the server, not any existing connections. From 33919239578a55468529f80c45794978e2b8fd95 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Wed, 13 Dec 2017 22:35:47 -0800 Subject: [PATCH 2/2] Mention the specific version where keepAliveTimeout was introduced --- doc/api/http.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http.md b/doc/api/http.md index 27af3edd6a5469..e13e45a36ad53a 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -919,7 +919,7 @@ timeout has fired, it will reset the regular inactivity timeout, i.e., [`server.timeout`][]. A value of `0` will disable the keep-alive timeout behavior on incoming connections. -A value of `0` makes the http server behave similarly to earlier Node.js versions, +A value of `0` makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout. *Note*: The socket timeout logic is set up on connection, so changing this