```
feat(game): update websocket URL configuration and improve game room logic - Change VITE_GAME_WS_URL from /api/v1/ws to /ws in .env.development - Update proxy configuration in vite.config.ts to match new websocket path - Refactor leave room functionality to properly disconnect websocket and destroy room state - Add e2e testing script to package.json ```
This commit is contained in:
@@ -176,12 +176,15 @@ export function useChengduGameRoom(
|
||||
return
|
||||
}
|
||||
|
||||
leaveHallAfterAck.value = true
|
||||
const sent = sendLeaveRoom()
|
||||
if (!sent) {
|
||||
leaveHallAfterAck.value = false
|
||||
pushWsMessage('[client] Leave room request was not sent')
|
||||
}
|
||||
|
||||
leaveHallAfterAck.value = false
|
||||
disconnectWs()
|
||||
destroyActiveRoomState()
|
||||
void router.push('/hall')
|
||||
}
|
||||
|
||||
function pushWsMessage(text: string): void {
|
||||
|
||||
Reference in New Issue
Block a user