Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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

  • Loading branch information
isaacs committed Sep 10, 2012
1 parent 54a4c63 commit 41e1b171ec644a1a5645e819cec7c8ccc0ba5f2e
Showing with 1 addition and 1 deletion.
  1. +1 −1 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.

0 comments on commit 41e1b17

Please sign in to comment.
You can’t perform that action at this time.