Skip to content

Commit

Permalink
fix resume.
Browse files Browse the repository at this point in the history
  • Loading branch information
talrasha007 committed Nov 30, 2014
1 parent a70955d commit 3ce6041
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/event-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ function EventStream(emitter, opt) {
util.inherits(EventStream, Readable);

EventStream.prototype._read = function () {
this._paused = false;
if (this._emitter.resume) this._resumeEmitter.call(this._emitter);
if (this._paused) {
this._paused = false;
if (this._emitter.resume) this._resumeEmitter.call(this._emitter);
}
};

module.exports = EventStream;

0 comments on commit 3ce6041

Please sign in to comment.