Merge pull request #209 from Icehunter/patch-1
Update for "write after end" uncaught error.
This commit is contained in:
@@ -48,7 +48,13 @@ BaseRollingFileStream.prototype._write = function(chunk, encoding, callback) {
|
|||||||
function writeTheChunk() {
|
function writeTheChunk() {
|
||||||
debug("writing the chunk to the underlying stream");
|
debug("writing the chunk to the underlying stream");
|
||||||
that.currentSize += chunk.length;
|
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");
|
debug("in _write");
|
||||||
|
|||||||
Reference in New Issue
Block a user