Skip to content

Commit

Permalink
simpler fix for #5
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictarr committed Jul 6, 2018
1 parent a081c23 commit 7342395
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ module.exports = function (timeout) {
var next = queue.shift()
next.cb(null, state.get(next.length))
}
else if(ended == true && queue[0].length && state.length < queue[0].length)
queue.shift().cb(new Error('stream ended with:'+state.length+' but wanted:'+queue.length))
else if(ended)
queue.shift().cb(ended)
else
Expand Down

0 comments on commit 7342395

Please sign in to comment.