Browse Source

stream.pipe: Don't call destroy() unless it's a function

v0.8.9-release
isaacs 12 years ago
parent
commit
41e1b171ec
  1. 2
      lib/stream.js

2
lib/stream.js

@ -71,7 +71,7 @@ Stream.prototype.pipe = function(dest, options) {
if (didOnEnd) return;
didOnEnd = true;
dest.destroy();
if (typeof dest.destroy === 'function') dest.destroy();
}
// don't leave dangling pipes when there are errors.

Loading…
Cancel
Save