Skip to content

Commit

Permalink
fix(web-server): ignore future socket errors
Browse files Browse the repository at this point in the history
Karma sometimes reports uncaught exceptions (ECONNRESET) which causes it to exit the process with a non-zero exit code.

Fixes #3295
  • Loading branch information
mgroenhoff committed Dec 17, 2019
1 parent 80febfb commit 62d83bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/web-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ function createWebServer (injector, config) {

server.on('upgrade', function (req, socket, head) {
log.debug(`upgrade ${req.url}`)
// ignore future socket errors
socket.on('error', () => {})
proxyMiddlewareInstance.upgrade(req, socket, head)
})

Expand Down

0 comments on commit 62d83bc

Please sign in to comment.