iotjs
iotjs copied to clipboard
readable stream does not emit 'end' event
After applying daf7b020ad9d762e9537a9a1b5bd9f36fb7177a4 commit, readable stream does not emit 'end' event after pushing null into stream.
Readable.prototype.resume = function() {
console.log("resume");
var state = this._readableState;
if (!state.flowing) {
state.flowing = true;
if (state.length > 0) {
console.log("emitData");
emitData(this, readBuffer(this));
}
var self = this;
process.nextTick(function() {
self.read(0);
});
}
return this;
};
code above seems to work fine in my http test, but i am not 100% sure for the correctness.
@chunseoklee #106 landed, could you check if this problem is fixed?
@chunseoklee I think we can close this as #144 landed?
It should have been close by #106. Now, closed.