Skip to content

Commit 2f93ba4

Browse files
committed
[fix] Destroy log file streams in a more intelligent way.
1 parent 89f3614 commit 2f93ba4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/forever/plugins/logger.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ exports.attach = function (options) {
2929
monitor.on('restart', startLogs);
3030

3131
monitor.on('exit', function () {
32-
monitor.stdout.end();
33-
monitor.stderr.end();
32+
if (monitor.stdout) {
33+
monitor.stdout.destroySoon();
34+
}
35+
if (monitor.stderr) {
36+
monitor.stderr.destroySoon();
37+
}
3438
});
3539

3640
function startLogs(child, childData) {

0 commit comments

Comments
 (0)