fix(join): add missing action DISCONNECT_IF_CONNECTED
This commit is contained in:
parent
c794db0fbc
commit
2171b0c6cd
|
@ -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'],
|
||||
|
|
|
@ -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({
|
||||
|
@ -126,9 +128,10 @@ export default {
|
|||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
throw e;
|
||||
// this.error = e.message;
|
||||
this.error = e.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue