Skip to content

Commit

Permalink
fix: avoid loop redirect in logout
Browse files Browse the repository at this point in the history
  • Loading branch information
geolffreym committed Mar 13, 2021
1 parent 1524748 commit 3c064dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions public/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

};
Expand Down Expand Up @@ -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()
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/app/pages/index-view/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 3c064dc

Please sign in to comment.