diff --git a/lib/forever/plugins/logger.js b/lib/forever/plugins/logger.js index 17772f6c..5ed83e58 100644 --- a/lib/forever/plugins/logger.js +++ b/lib/forever/plugins/logger.js @@ -29,8 +29,12 @@ exports.attach = function (options) { monitor.on('restart', startLogs); monitor.on('exit', function () { - monitor.stdout.end(); - monitor.stderr.end(); + if (monitor.stdout) { + monitor.stdout.destroySoon(); + } + if (monitor.stderr) { + monitor.stderr.destroySoon(); + } }); function startLogs(child, childData) {