Skip to content

Commit

Permalink
Fix reconnect and fix client crash by making stdout limit 1GB
Browse files Browse the repository at this point in the history
  • Loading branch information
Pupix committed May 20, 2019
1 parent 2dd6395 commit 0bb7856
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ app.on('ready', () => {
try {
if (LCURestarted) {
mainWindow.webContents.send('lcu-load', LCUData);
LCURestarted = false;
return;
}

Expand Down
7 changes: 4 additions & 3 deletions util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 0bb7856

Please sign in to comment.