Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add .abort() method

  • Loading branch information...
commit c56946f4d10e46adb3e67d9646adcf32581c72b5 1 parent 6634fa9
@isaacs isaacs authored
Showing with 6 additions and 1 deletion.
  1. +5 −0 lib/abstract.js
  2. +1 −1  lib/reader.js
View
5 lib/abstract.js
@@ -20,6 +20,11 @@ Abstract.prototype.on = function (ev, fn) {
return this
}
+Abstract.prototype.abort = function () {
+ this._aborted = true
+ this.emit("abort")
+}
+
Abstract.prototype.destroy = function () {}
Abstract.prototype.warn = function (msg, code) {
View
2  lib/reader.js
@@ -191,7 +191,7 @@ Reader.prototype._stat = function (currentStat) {
// special handling for ProxyReaders
if (!me.filter.call(who, who, props)) {
if (!me._disowned) {
- me._aborted = true
+ me.abort()
me.emit("end")
me.emit("close")
}
Please sign in to comment.
Something went wrong with that request. Please try again.