From 16f60f366bc8eeef1768ca705e0f8dd80a8c47c7 Mon Sep 17 00:00:00 2001 From: Pierre-Alexis Ciavaldini Date: Wed, 17 Jan 2018 21:00:42 +0100 Subject: [PATCH] do not stop GUI if daemon connection fails, start RC versions on testnet with console output --- main.js | 3 +++ modules/daemon/daemon.js | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 2fc008b0b..da71f2866 100644 --- a/main.js +++ b/main.js @@ -32,6 +32,9 @@ let openDevTools = false; if (process.argv.includes('-opendevtools')) openDevTools = true; +if (app.getVersion().includes('RC')) + process.argv.push(...['-testnet', '-printtoconsole']); + // This method will be called when Electron has finished // initialization and is ready to create browser windows. // Some APIs can only be used after this event occurs. diff --git a/modules/daemon/daemon.js b/modules/daemon/daemon.js index 5185d4539..07184ddea 100644 --- a/modules/daemon/daemon.js +++ b/modules/daemon/daemon.js @@ -91,7 +91,7 @@ exports.start = function (wallets, callback) { exports.wait = function(wallets, callback) { return new Promise((resolve, reject) => { - const maxRetries = 10; // Some slow computers... + const maxRetries = 100; // Some slow computers... let retries = 0; let errorString = ''; @@ -117,7 +117,6 @@ exports.wait = function(wallets, callback) { } log.error('Could not connect to daemon.') reject(); - electron.app.exit(); } } /* daemonStartup */