1
0
forked from noxious/client

Race condition maybe?

This commit is contained in:
Dennis Postma 2024-09-10 14:19:04 +02:00
parent bd65699cc5
commit 7d0a6084c5

View File

@ -62,11 +62,11 @@ export const useGameStore = defineStore('game', {
}) })
}, },
disconnectSocket() { disconnectSocket() {
if (!this.connection) return if (this.connection) this.connection.disconnect()
this.connection.disconnect() useCookies().remove('token')
this.connection = null this.connection = null
this.token = null this.token = null
this.user = null this.user = null
this.character = null this.character = null
@ -74,8 +74,6 @@ export const useGameStore = defineStore('game', {
this.isMovingCamera = false this.isMovingCamera = false
this.isChatOpen = false this.isChatOpen = false
this.isUserPanelOpen = false this.isUserPanelOpen = false
useCookies().remove('token')
} }
} }
}) })