http, http2: remove default server timeout

Timing out and closing the socket after two minutes have elapsed is
surprising and problematic for users. This behavior was specific to
Node.js, and doesn't seem to be common in other language runtimes.

Fixes: https://github.com/nodejs/node/issues/27556

PR-URL: https://github.com/nodejs/node/pull/27558
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Ali Ijaz Sheikh
2019-05-03 16:45:57 -07:00
parent e582d11913
commit c30ef3cbd2
7 changed files with 28 additions and 17 deletions

View File

@@ -71,7 +71,7 @@ function Server(opts, requestListener) {
conn.destroy(err);
});
this.timeout = 2 * 60 * 1000;
this.timeout = 0;
this.keepAliveTimeout = 5000;
this.maxHeadersCount = null;
this.headersTimeout = 40 * 1000; // 40 seconds