Skip to content

Commit

Permalink
Memory leak fix: do not wait for process.nextTick to clear pending …
Browse files Browse the repository at this point in the history
…callbacks (#2057)

* Memory leak fix: do not wait process.nextTick 

Addresses the memory leak identified here:

#1871 (comment)

* resolve linting failure
  • Loading branch information
smashah authored Feb 5, 2022
1 parent 438cb73 commit f741383
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/winston/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ class Logger extends Transform {
try {
this.push(this.format.transform(info, this.format.options));
} finally {
this._writableState.sync = false;
// eslint-disable-next-line callback-return
callback();
}
Expand Down

0 comments on commit f741383

Please sign in to comment.