Skip to content

Commit

Permalink
doc: doc imitating the old behavior of http.Server.keepAliveTimeout
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
  • Loading branch information
TysonAndre-tmg authored and MylesBorins committed Jan 9, 2018
1 parent 4391ea4 commit 4850c87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,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.
Expand All @@ -929,7 +929,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 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
value only affects new connections to the server, not any existing connections.
Expand Down

0 comments on commit 4850c87

Please sign in to comment.