diff --git a/lib/winston/transports/file.js b/lib/winston/transports/file.js index b60fb9269..cec2c3106 100644 --- a/lib/winston/transports/file.js +++ b/lib/winston/transports/file.js @@ -394,7 +394,7 @@ File.prototype.close = function () { this._stream.end(); this._stream.destroySoon(); - this._stream.once('drain', function () { + this._stream.once('finish', function () { self.emit('flush'); self.emit('closed'); });