Skip to content

Commit

Permalink
fix: avoid clashing by ECONNRESET (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsn committed Apr 20, 2018
1 parent de82d01 commit 1dd6dab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/server/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ export function wsEventObserver(
)
}
})

ws.on('error', err => {
// To avoid clashing extension by ECONNRESET error...
// https://github.com/websockets/ws/issues/1256
if ((err as any).code === 'ECONNRESET') return
throw err
})
})
})
}
Expand Down

0 comments on commit 1dd6dab

Please sign in to comment.