Skip to content

Commit

Permalink
don't call next until the current line has been successfully flushed
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Tescher committed Feb 13, 2015
1 parent 6019b67 commit 9e08c9a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ LogStream.prototype._write = function(chunk, encoding, cb) {
self._rotate();
self.once('ready', function() {
self.writer.size += line.length;
self.writer.write(line);
next();
self.writer.write(line, next);
});
} else {
self.writer.size += line.length;
self.writer.write(line);
next();
self.writer.write(line, next);
}
}

Expand Down

0 comments on commit 9e08c9a

Please sign in to comment.