mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
http: refactor headersTimeout and requestTimeout logic
PR-URL: https://github.com/nodejs/node/pull/41263 Fixes: https://github.com/nodejs/node/issues/33440 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
@@ -40,6 +40,7 @@ const tls = require('tls');
|
||||
const { Agent: HttpAgent } = require('_http_agent');
|
||||
const {
|
||||
Server: HttpServer,
|
||||
setupConnectionsTracking,
|
||||
storeHTTPOptions,
|
||||
_connectionListener,
|
||||
} = require('_http_server');
|
||||
@@ -80,10 +81,8 @@ function Server(opts, requestListener) {
|
||||
});
|
||||
|
||||
this.timeout = 0;
|
||||
this.keepAliveTimeout = 5000;
|
||||
this.maxHeadersCount = null;
|
||||
this.headersTimeout = 60 * 1000; // 60 seconds
|
||||
this.requestTimeout = 0;
|
||||
setupConnectionsTracking(this);
|
||||
}
|
||||
ObjectSetPrototypeOf(Server.prototype, tls.Server.prototype);
|
||||
ObjectSetPrototypeOf(Server, tls.Server);
|
||||
|
||||
Reference in New Issue
Block a user