http: destroy sockets after keepAliveTimeout

Implement server.keepAliveTimeout in addition to server.timeout to
prevent temporary socket/memory leaking in keep-alive mode.

PR-URL: https://github.com/nodejs/node/pull/2534
Author: Timur Shemsedinov <timur.shemsedinov@gmail.com>
Author: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
Timur Shemsedinov authored and Rod Vagg committed 2019-02-28 16:55:53 +11:00
1 parent d82f8c4c35
commit f23b3b6bad
6 files changed
+249 -7

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ function Server(opts, requestListener) {
});
this.timeout = 2 * 60 * 1000;
this.keepAliveTimeout = 5000;
this.headersTimeout = 40 * 1000; // 40 seconds
}
inherits(Server, tls.Server);