Skip to content
Open
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: 2 additions & 0 deletions stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ function WebSocketStream(target, protocols, options) {
socket.onerror = onerror
socket.onmessage = onmessage

proxy.on('error', function(){})
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore errors? It can lead to even more long debugging then you have had.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we have two options here: Ignore unhandled errors or have unhandled errors lead to crashes. My first pull request was to document how to handle errors so you don't have crashes and I was asked to instead fix the issue. I don't think there is a third option but I'd be very happy to learn something.


proxy.on('close', destroy)

var coerceToBuffer = !options.objectMode
Expand Down