Skip to content

Commit

Permalink
fix(@angular/cli): increase keepAliveTimeout for all Node 8 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitMY authored and filipesilva committed Sep 26, 2017
1 parent 42d59d5 commit a9f6702
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@angular/cli/tasks/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,14 @@ export default Task.extend({
opn(serverAddress);
}
});
// Node 8.0 - 8.4 has a keepAliveTimeout bug which doesn't respect active connections.
// Node 8 has a keepAliveTimeout bug which doesn't respect active connections.
// Connections will end after ~5 seconds (arbitrary), often not letting the full download
// of large pieces of content, such as a vendor javascript file. This results in browsers
// throwing a "net::ERR_CONTENT_LENGTH_MISMATCH" error.
// https://github.com/angular/angular-cli/issues/7197
// https://github.com/nodejs/node/issues/13391
// https://github.com/nodejs/node/commit/2cb6f2b281eb96a7abe16d58af6ebc9ce23d2e96
if (/^v8.[0-4].\d+$/.test(process.version)) {
if (/^v8.\d.\d+$/.test(process.version)) {
httpServer.keepAliveTimeout = 30000; // 30 seconds
}
})
Expand Down

0 comments on commit a9f6702

Please sign in to comment.