We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8320c1 commit 2609a55Copy full SHA for 2609a55
lib/winston/transports/file.js
@@ -159,6 +159,9 @@ module.exports = class File extends TransportStream {
159
if (this._opening) {
160
return;
161
}
162
+ if (this._rotate) {
163
+ return;
164
+ }
165
166
// Check to see if we need to end the stream and create a new one.
167
if (!this._needsNewFile()) {
@@ -502,6 +505,7 @@ module.exports = class File extends TransportStream {
502
505
*/
503
506
_cleanupStream(stream) {
504
507
stream.removeListener('error', this._onError);
508
+ stream.destroy();
509
510
return stream;
511
0 commit comments