Update for "write after end" uncaught error.
This commit is contained in:
parent
ca5272aacc
commit
b12200fabc
@ -48,7 +48,14 @@ 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);
|
if(that.theStream.writeable) {
|
||||||
|
try {
|
||||||
|
that.theStream.write(chunk, encoding, callback);
|
||||||
|
}
|
||||||
|
catch (err){
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
debug("in _write");
|
debug("in _write");
|
||||||
|
Loading…
Reference in New Issue
Block a user