forked from noxious/client
#99 : Check if token is valid, else log out
This commit is contained in:
@ -48,6 +48,11 @@ export const useGameStore = defineStore('game', {
|
||||
reconnectionAttempts: 5
|
||||
})
|
||||
|
||||
// #99 - If we can't connect, disconnect
|
||||
this.connection.on('connect_error', () => {
|
||||
this.disconnectSocket()
|
||||
})
|
||||
|
||||
// Let the server know the user is logged in
|
||||
this.connection.emit('login')
|
||||
|
||||
|
Reference in New Issue
Block a user