iotjs icon indicating copy to clipboard operation
iotjs copied to clipboard

readable stream does not emit 'end' event

Open chunseoklee opened this issue 11 years ago • 4 comments

After applying daf7b020ad9d762e9537a9a1b5bd9f36fb7177a4 commit, readable stream does not emit 'end' event after pushing null into stream.

chunseoklee avatar Jun 25 '15 07:06 chunseoklee

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 avatar Jun 25 '15 07:06 chunseoklee

@chunseoklee #106 landed, could you check if this problem is fixed?

ILyoan avatar Jun 29 '15 05:06 ILyoan

@chunseoklee I think we can close this as #144 landed?

ILyoan avatar Aug 03 '15 01:08 ILyoan

It should have been close by #106. Now, closed.

chunseoklee avatar Aug 03 '15 09:08 chunseoklee