mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
http: remove redundant keepAliveTimeoutBuffer assignment
PR-URL: https://github.com/nodejs/node/pull/61743 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
1 parent
52668874fd
commit
899884d0ed
1 file changed
-6
@@ -574,12 +574,6 @@ function Server(options, requestListener) {
|
||||
|
||||
storeHTTPOptions.call(this, options);
|
||||
|
||||
// Optional buffer added to the keep-alive timeout when setting socket timeouts.
|
||||
// Helps reduce ECONNRESET errors from clients by extending the internal timeout.
|
||||
// Default is 1000ms if not specified.
|
||||
const buf = options.keepAliveTimeoutBuffer;
|
||||
this.keepAliveTimeoutBuffer =
|
||||
(typeof buf === 'number' && NumberIsFinite(buf) && buf >= 0) ? buf : 1000;
|
||||
net.Server.call(
|
||||
this,
|
||||
{ allowHalfOpen: true, noDelay: options.noDelay ?? true,
|
||||
|
||||
Reference in new issue
Block a user