Skip to content

Commit

Permalink
Add missing callbacks for HDR and OVER streams
Browse files Browse the repository at this point in the history
  • Loading branch information
rlidwka committed May 8, 2017
1 parent 2014dad commit 56ecfb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/commands/hdr.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ module.exports = {
count++;
this.push(transform(article));
callback();
}, function () {
}, function (callback) {
if (count === 0) this.push(status._423_NO_ARTICLE_BY_NUM);
else this.push('.');
callback();
});

pump(article_stream, stream);
Expand Down
3 changes: 2 additions & 1 deletion lib/commands/over.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ module.exports = {
count++;
this.push(transform(article));
callback();
}, function () {
}, function (callback) {
if (count === 0) this.push(status._423_NO_ARTICLE_BY_NUM);
else this.push('.');
callback();
});

pump(article_stream, stream);
Expand Down

0 comments on commit 56ecfb9

Please sign in to comment.