1
0
forked from noxious/client

#99 : Check if token is valid, else log out

This commit is contained in:
2024-09-13 21:38:00 +02:00
parent 20015705c5
commit b05a5920ba
2 changed files with 253 additions and 215 deletions

View File

@ -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')