Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: dumduel snapshots via WS — UDP was silently dropping all packets

Server-side UDP channel appeared "open" but no snapshot data was
reaching the client. Early WS snapshots during countdown worked,
then after UDP channel resolution all snapshots went to a dead
UDP pipe. Switching to WS-only for duel snapshots — data is small
(~400 bytes at 20Hz) and reliability matters more than latency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+2 -7
+2 -7
session-server/duel-manager.mjs
··· 569 569 console.log(`🎯 Duel snapshot #${this.tick} phase=${this.phase} bullets=${bulletsData.length} via [${channels.join(", ")}]`); 570 570 } 571 571 572 - // Send to each player with UDP channel, fallback to WS 572 + // Always send via WS for reliability (UDP was silently dropping packets) 573 573 for (const [handle, player] of this.players) { 574 574 if (handle === DUMMY_HANDLE) continue; 575 - // Try UDP first, fall back to WS if channel is dead 576 - let sent = false; 577 - if (player.udpChannelId && this.sendUDP) { 578 - sent = this.sendUDP(player.udpChannelId, "duel:snapshot", data); 579 - } 580 - if (!sent && player.wsId != null && this.sendWS) { 575 + if (player.wsId != null && this.sendWS) { 581 576 this.sendWS(player.wsId, "duel:snapshot", snapshot); 582 577 } 583 578 }