diff --git a/public/core/index.js b/public/core/index.js index bc7468b61..8a78a9a48 100644 --- a/public/core/index.js +++ b/public/core/index.js @@ -111,9 +111,9 @@ module.exports = (ipcMain) => { .on('node-peer', (peerSize) => e.reply('node-peer', peerSize)) .on('node-chaos', (m) => { // Stop queue processor - e.reply('node-chaos', m) - queueInterval && cleanInterval(queueInterval) ipcMain.emit('party'); + e.reply('node-chaos', m) + cleanInterval(queueInterval) }) }; @@ -161,7 +161,7 @@ module.exports = (ipcMain) => { closed: () => orbit.closed, close: async (win) => { win?.webContents && win.webContents.send('node-step', 'Closing') - queueInterval && cleanInterval(queueInterval) + cleanInterval(queueInterval) await orbit.close() } } diff --git a/src/core/app/pages/index-view/index.jsx b/src/core/app/pages/index-view/index.jsx index 2b166bc0c..39da0fdea 100755 --- a/src/core/app/pages/index-view/index.jsx +++ b/src/core/app/pages/index-view/index.jsx @@ -122,12 +122,12 @@ export default class MovieIndex extends React.Component { }).on('chaos', (m) => { // Kill node and restart login - this.setState({state: m}); + this.setState({state: m, ready: false}); setTimeout(() => window.location.href = '#/', 1000) }).on('error', (msg = 'Waiting Network') => { if (this.state.ready) return; - this.setState({state: msg}); + this.setState({state: msg, ready: false}); }).on('done', () => { log.info('LOAD DONE')