Merge pull request #209 from Icehunter/patch-1

Update for "write after end" uncaught error.
This commit is contained in:
Gareth Jones 2014-06-28 08:02:27 +10:00
commit 101739ebef

View File

@ -48,7 +48,13 @@ BaseRollingFileStream.prototype._write = function(chunk, encoding, callback) {
function writeTheChunk() {
debug("writing the chunk to the underlying stream");
that.currentSize += chunk.length;
that.theStream.write(chunk, encoding, callback);
try {
that.theStream.write(chunk, encoding, callback);
}
catch (err){
debug(err);
callback();
}
}
debug("in _write");