diff --git a/frontend/src/composables/useFightPolling.ts b/frontend/src/composables/useFightPolling.ts index 49934d0..6fd1076 100644 --- a/frontend/src/composables/useFightPolling.ts +++ b/frontend/src/composables/useFightPolling.ts @@ -102,6 +102,8 @@ export function useFightPolling(fightId: Ref) { onHumanChallenge?: (data: any) => void onReaction?: (data: any) => void }) { + // Close any existing SSE connection before opening a new one + disconnectSSE() eventSource = new EventSource(`/api/fights/${fightId.value}/stream`) addSSEListener(eventSource, 'spectator_count', (e) => {