Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 073c0f7

Browse files
TysonAndre-tmgMylesBorins
authored andcommittedJan 8, 2018
doc: doc 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 0aa7ef5, it seems like they behave the same way. Related to issues such as #13391 that show up when migrating to node 8 PR-URL: #17660 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
1 parent b919ac1 commit 073c0f7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎doc/api/http.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ added: v0.9.12
911911
The number of milliseconds of inactivity before a socket is presumed
912912
to have timed out.
913913

914-
A value of 0 will disable the timeout behavior on incoming connections.
914+
A value of `0` will disable the timeout behavior on incoming connections.
915915

916916
*Note*: The socket timeout logic is set up on connection, so changing this
917917
value only affects new connections to the server, not any existing connections.
@@ -929,7 +929,9 @@ will be destroyed. If the server receives new data before the keep-alive
929929
timeout has fired, it will reset the regular inactivity timeout, i.e.,
930930
[`server.timeout`][].
931931

932-
A value of 0 will disable the keep-alive timeout behavior on incoming connections.
932+
A value of `0` will disable the keep-alive timeout behavior on incoming connections.
933+
A value of `0` makes the http server behave similarly to Node.js versions prior to 8.0.0,
934+
which did not have a keep-alive timeout.
933935

934936
*Note*: The socket timeout logic is set up on connection, so changing this
935937
value only affects new connections to the server, not any existing connections.

0 commit comments

Comments
 (0)
Please sign in to comment.