Skip to content

Commit

Permalink
reconnect on signin
Browse files Browse the repository at this point in the history
  • Loading branch information
Voyager Bot committed Jan 6, 2019
1 parent 5dc8d80 commit a9e29b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/renderer/vuex/modules/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export default function({ node }) {
commit(`setConnected`, false)
node.rpcReconnect()
},
async removeSubscriptions() {
node.rpcDisconnect()
node.rpcConnect(config.node_rpc)
},
async rpcSubscribe({ commit, dispatch }) {
if (state.stopConnecting) return

Expand Down
1 change: 1 addition & 0 deletions app/src/renderer/vuex/modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export default ({ node }) => {
state.account = null
state.signedIn = false

dispatch(`removeSubscriptions`)
commit(`setModalSession`, true)
dispatch(`showInitialScreen`)
},
Expand Down

0 comments on commit a9e29b2

Please sign in to comment.