From 0bb7856e7ef77881dee23694ff48e1debea58b38 Mon Sep 17 00:00:00 2001 From: Robert Manolea Date: Mon, 20 May 2019 22:55:25 +0200 Subject: [PATCH] Fix reconnect and fix client crash by making stdout limit 1GB --- app.js | 1 + util.js | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 1cac7b5..3e546ff 100644 --- a/app.js +++ b/app.js @@ -59,6 +59,7 @@ app.on('ready', () => { try { if (LCURestarted) { mainWindow.webContents.send('lcu-load', LCUData); + LCURestarted = false; return; } diff --git a/util.js b/util.js index b95f446..84024d0 100644 --- a/util.js +++ b/util.js @@ -57,14 +57,15 @@ function restartLCUWithOverride(LCUData) { await requestPromise({ strictSSL: false, - method: 'POST', - maxBuffer: 1024 * 1024 * 1024, + method: 'POST', uri: `https://${username}:${password}@${address}:${port}/process-control/v1/process/quit`, }); // Give it some time to do cleanup setTimeout(() => { - execFile(LCUExePath.trim(), [`--system-yaml-override=${overrideSystemFile}`]); + execFile(LCUExePath.trim(), [`--system-yaml-override=${overrideSystemFile}`], { + maxBuffer: 1024 * 1024 * 1024 // 1GB + }); resolve(); }, 5000); });