Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.16.0
6.17.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
"xmlbuilder": "9.0.4"
},
"engines": {
"node": "6.16.0",
"node": "6.17.0",
"npm": "3.10.10"
}
}
11 changes: 9 additions & 2 deletions src/server/http/setup_connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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.
Expand Down