feat(daemon): don't block app renderer on daemon start
This commit is contained in:
parent
070c7c6047
commit
670145753a
|
@ -71,7 +71,7 @@ const createWindow = () => {
|
|||
registerDebugShortcut(app, mainWindow);
|
||||
|
||||
mainWindow.loadURL(
|
||||
isDev ? 'http://0.0.0.0:8080/' : `file://${path.join(__dirname, '../build/index.html')}`,
|
||||
isDev ? 'http://localhost:8080/' : `file://${path.join(__dirname, '../build/index.html')}`,
|
||||
);
|
||||
|
||||
exports.app = app;
|
||||
|
@ -87,14 +87,14 @@ app.on('ready', async () => {
|
|||
return;
|
||||
}
|
||||
|
||||
const [err, proc] = await eres(runDaemon());
|
||||
|
||||
if (err || !proc) return zcashLog(err);
|
||||
|
||||
/* eslint-disable-next-line */
|
||||
zcashLog(`Zcash Daemon running. PID: ${proc.pid}`);
|
||||
|
||||
zcashDaemon = proc;
|
||||
runDaemon()
|
||||
.then((proc) => {
|
||||
if (proc) {
|
||||
zcashLog(`Zcash Daemon running. PID: ${proc.pid}`);
|
||||
zcashDaemon = proc;
|
||||
}
|
||||
})
|
||||
.catch(zcashLog);
|
||||
});
|
||||
app.on('activate', () => {
|
||||
if (mainWindow === null) createWindow();
|
||||
|
|
Loading…
Reference in New Issue