Skip to content

Commit

Permalink
A .stop() method and event, works just like .die()
Browse files Browse the repository at this point in the history
  • Loading branch information
jhs committed Sep 26, 2011
1 parent d00c2d2 commit 7bb6c7b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions feed.js
Expand Up @@ -413,6 +413,7 @@ Feed.prototype.on_couch_error = function on_couch_error(er) {
return self.retry();
}

Feed.prototype.stop =
Feed.prototype.die = function(er) {
var self = this;

Expand All @@ -426,6 +427,7 @@ Feed.prototype.die = function(er) {
destroy_req(req);
}

self.emit('stop', er);
if(er)
self.emit('error', er);
}
Expand Down

0 comments on commit 7bb6c7b

Please sign in to comment.