Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
fix(join): add missing action DISCONNECT_IF_CONNECTED
Browse files Browse the repository at this point in the history
  • Loading branch information
ttshivers committed Sep 5, 2020
1 parent c794db0 commit 2171b0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/store/modules/synclounge/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export default {
await dispatch('DISCONNECT_IF_CONNECTED');

const properBase = new URL(getters.GET_SERVER, window.location);

const url = combineUrl('socket.io', properBase.toString());
console.log('ESTABLISH_SOCKET_CONNECTION', url.toString());

const { id } = await open(url.origin, {
path: url.pathname,
transports: ['websocket', 'polling'],
Expand Down
7 changes: 5 additions & 2 deletions src/views/join.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ export default {
methods: {
...mapActions('synclounge', [
'SET_AND_CONNECT_AND_JOIN_ROOM',
'DISCONNECT_IF_CONNECTED',
]),
async joinInvite() {
this.error = null;
this.loading = true;
try {
await this.SET_AND_CONNECT_AND_JOIN_ROOM({
Expand All @@ -126,9 +128,10 @@ export default {
}
} catch (e) {
console.log(e);
throw e;
// this.error = e.message;
this.error = e.message;
}
this.loading = false;
},
},
};
Expand Down

0 comments on commit 2171b0c

Please sign in to comment.