From 96dddecd4dcbd57969a269cb4ed9d57716625747 Mon Sep 17 00:00:00 2001 From: Jonas Hermsmeier Date: Mon, 8 Jan 2018 23:09:55 +0100 Subject: [PATCH] fix(writer): Silence IPC output on stdout (#1961) This was causing the stdout maxBuffer size to be exceeded when flashing larger images (or having flashes that took a while). Fixes #1955 Change-Type: patch Changlog Entry: Fix "stdout maxBuffer exceeded" error on Linux --- lib/gui/modules/child-writer.js | 5 ++++- lib/gui/modules/image-writer.js | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/gui/modules/child-writer.js b/lib/gui/modules/child-writer.js index 640829e7..4045bc69 100644 --- a/lib/gui/modules/child-writer.js +++ b/lib/gui/modules/child-writer.js @@ -23,7 +23,10 @@ const writer = require('../../cli/writer') ipc.config.id = process.env.IPC_CLIENT_ID ipc.config.socketRoot = process.env.IPC_SOCKET_ROOT -ipc.config.silent = false + +// NOTE: Ensure this isn't disabled, as it will cause +// the stdout maxBuffer size to be exceeded when flashing +ipc.config.silent = true // > If set to 0, the client will NOT try to reconnect. // See https://github.com/RIAEvangelist/node-ipc/ diff --git a/lib/gui/modules/image-writer.js b/lib/gui/modules/image-writer.js index 3e4ba83d..2921b9af 100644 --- a/lib/gui/modules/image-writer.js +++ b/lib/gui/modules/image-writer.js @@ -84,6 +84,9 @@ exports.performWrite = (image, drive, onProgress) => { ipc.config.id = IPC_SERVER_ID ipc.config.socketRoot = path.join(process.env.XDG_RUNTIME_DIR || os.tmpdir(), path.sep) + + // NOTE: Ensure this isn't disabled, as it will cause + // the stdout maxBuffer size to be exceeded when flashing ipc.config.silent = true ipc.serve()