node-warc
node-warc copied to clipboard
WARCStreamTransform can experience ERR_MULTIPLE_CALLBACK error
https://github.com/N0taN3rd/node-warc/blob/be3897198847fa49023ca4d09f09c0010dd98540/lib/parsers/warcStreamTransform.js#L110-L115
since _consumeChunk calls done, i think this should be:
_flush (done) {
if (this.buffered) {
this._consumeChunk(this.buffered, done, true)
} else {
done()
}
}
Hey, I just made this change because I ran into the exact error you are talking about. I was using their stream demo code and this fixed it.