Skip to content

Commit

Permalink
Merge pull request #667 from z-10/listen-to-finish
Browse files Browse the repository at this point in the history
Fixed event subscription on transport close
  • Loading branch information
indexzero committed Jul 17, 2015
2 parents 4dd10f5 + c6d45f9 commit a08adc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/winston/transports/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
Expand Down

0 comments on commit a08adc3

Please sign in to comment.