Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

no need to check error listener count

EventEmitter does this already.
  • Loading branch information...
commit 581a79bb786bf6ca64fb23cbe5d8294dc3500a1b 1 parent 836a06f
@andrewrk authored
Showing with 0 additions and 3 deletions.
  1. +0 −3  lib/stream.js
View
3  lib/stream.js
@@ -77,9 +77,6 @@ Stream.prototype.pipe = function(dest, options) {
// don't leave dangling pipes when there are errors.
function onerror(er) {
cleanup();
- if (this.listeners('error').length === 0) {
- throw er; // Unhandled stream error in pipe.
- }
}
source.on('error', onerror);

1 comment on commit 581a79b

@skenqbx

Actually the EventEmitter won't throw as onerror listens on the event.

Please sign in to comment.
Something went wrong with that request. Please try again.