summaryrefslogtreecommitdiff
path: root/lib/internal/http2
diff options
context:
space:
mode:
authorAli Ijaz Sheikh <ofrobots@google.com>2019-05-03 16:45:57 -0700
committerAli Ijaz Sheikh <ofrobots@google.com>2019-05-09 08:54:04 -0700
commitc30ef3cbd2e42ac1d600f6bd78a601a5496b0877 (patch)
tree44087e0e6bc08c1bc846f72daf9bd418a7c24ea8 /lib/internal/http2
parente582d1191376b8bf129a04730b04a2cd52ae5202 (diff)
downloadandroid-node-v8-c30ef3cbd2e42ac1d600f6bd78a601a5496b0877.tar.gz
android-node-v8-c30ef3cbd2e42ac1d600f6bd78a601a5496b0877.tar.bz2
android-node-v8-c30ef3cbd2e42ac1d600f6bd78a601a5496b0877.zip
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>
Diffstat (limited to 'lib/internal/http2')
-rw-r--r--lib/internal/http2/core.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js
index 58193b41cd..6ad1668c4f 100644
--- a/lib/internal/http2/core.js
+++ b/lib/internal/http2/core.js
@@ -171,8 +171,6 @@ const kState = Symbol('state');
const kType = Symbol('type');
const kWriteGeneric = Symbol('write-generic');
-const kDefaultSocketTimeout = 2 * 60 * 1000;
-
const {
paddingBuffer,
PADDING_BUF_FRAME_LENGTH,
@@ -2680,7 +2678,7 @@ class Http2SecureServer extends TLSServer {
options = initializeTLSOptions(options);
super(options, connectionListener);
this[kOptions] = options;
- this.timeout = kDefaultSocketTimeout;
+ this.timeout = 0;
this.on('newListener', setupCompat);
if (typeof requestListener === 'function')
this.on('request', requestListener);
@@ -2702,7 +2700,7 @@ class Http2Server extends NETServer {
constructor(options, requestListener) {
super(connectionListener);
this[kOptions] = initializeOptions(options);
- this.timeout = kDefaultSocketTimeout;
+ this.timeout = 0;
this.on('newListener', setupCompat);
if (typeof requestListener === 'function')
this.on('request', requestListener);