Skip to content

Commit

Permalink
Reload client on websocket reconnect after error on live page
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim020 committed Jul 8, 2024
1 parent a3716d5 commit a3739d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/src/store/modules/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export default {
if (state.errorCount !== 0) {
Vue.$toast.success(`Websocket reconnected after ${state.errorCount} attempts`);
state.errorCount = 0;
if (router.currentRoute !== '/') {
window.location.reload();
}
}
},
SOCKET_ONCLOSE(state, event) {
Expand Down

0 comments on commit a3739d0

Please sign in to comment.