don't heartbeat at all

This commit is contained in:
2024-02-02 21:29:13 -06:00
parent 8f1fb96ac9
commit ec2480f48c
2 changed files with 7 additions and 12 deletions

View File

@@ -39,15 +39,11 @@ const themeIcon = computed(() => dark.value ? 'mdi-moon-waxing-crescent' : 'mdi-
const { status, data, send, open } = useWebSocket<string>(`wss://${window.location.host}/queue`, {
immediate: false,
heartbeat: {
interval: 1000,
message: '{"action":"ping"}',
},
onDisconnected: (ws, evt) => {
console.warn('lost connection', {evt});
onDisconnected: (_ws, evt) => {
console.warn('lost connection', { evt });
game.value = null;
dealer.value = null;
}
},
});
const game = ref<Game | null>(null);
const dealer = ref<boolean | null>(null);
@@ -77,6 +73,7 @@ const loading = computed(() => status.value === 'CONNECTING' || status.value ===
function clickPlay() {
open();
send('hi');
}
function action(evt: Action) {