[5.6] Bump node to 6.17.0 (#32201)

* Bump node to 6.17.0

* Resolve intermittent premature connection closed (#19808)

Node 8 changed the keepAlive to default to 5 seconds from 5 minutes. This reverts that behavior.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* 6
This commit is contained in:
Jonathan Budzenski 2019-03-07 18:20:10 -06:00 committed by GitHub
parent 22d1f0b835
commit e4c8b3e824
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions

View file

@ -1 +1 @@
6.16.0
6.17.0

View file

@ -280,7 +280,7 @@
"xmlbuilder": "9.0.4"
},
"engines": {
"node": "6.16.0",
"node": "6.17.0",
"npm": "3.10.10"
}
}

View file

@ -34,11 +34,15 @@ export default function (kbnServer, server, config) {
// not using https? well that's easy!
if (!useSsl) {
server.connection(connectionOptions);
const connection = server.connection(connectionOptions);
// revert to previous 2m keepalive timeout in Node < 6
connection.listener.keepAliveTimeout = 120e3;
return;
}
server.connection({
const connection = server.connection({
...connectionOptions,
tls: true,
listener: httpolyglot.createServer({
@ -54,6 +58,9 @@ export default function (kbnServer, server, config) {
})
});
// revert to previous 2m keepalive timeout in Node < 6
connection.listener.keepAliveTimeout = 120e3;
server.ext('onRequest', function (req, reply) {
// A request sent through a HapiJS .inject() doesn't have a socket associated with the request
// which causes a failure.