Skip to content

Loading…

Add .destroy to stream object #15

Open
wants to merge 1 commit into from

1 participant

@myndzi

Binary stream objects had no .destroy method, causing stream.onclose to fail when trying to call it (stream.js @ 0.8.1 line 74)

Kris Reeves Binary stream objects had no .destroy method, causing stream.onclose …
…to fail when trying to call it (stream.js @ 0.8.1 line 74)
1184e15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 3, 2012
  1. Binary stream objects had no .destroy method, causing stream.onclose …

    Kris Reeves committed
    …to fail when trying to call it (stream.js @ 0.8.1 line 74)
Showing with 3 additions and 0 deletions.
  1. +3 −0 index.js
View
3 index.js
@@ -216,6 +216,9 @@ exports.stream = function (input) {
stream.end = function () {
caughtEnd = true;
};
+ stream.destroy = function () {
+ caughtEnd = true;
+ };
stream.pipe = Stream.prototype.pipe;
Object.getOwnPropertyNames(EventEmitter.prototype).forEach(function (name) {
Something went wrong with that request. Please try again.