Skip to content

v1.7.22

Choose a tag to compare

@jasona jasona released this 06 Feb 00:08
· 118 commits to main since this release
c6820fe

WebSocket Resilience & Efficiency

Resilience

  • Fix SharedWorker crash recovery bug that prevented reconnection when worker died while appearing connected
  • Remove hard cap on reconnect attempts — indefinite retry with exponential backoff up to 5 min
  • Add sleep/wake drift detection in SharedWorker for faster recovery after laptop lid close/open
  • Add mobile visibility-based stale connection detection (non-SharedWorker path)
  • Align session token TTL with runtime disconnect timeout configuration

Efficiency

  • Extract shared protocol parser — eliminates ~300 lines of duplicated parsing code across two client files
  • Create shared protocol type definitions used by both server and client (single source of truth)
  • Enable perMessageDeflate WebSocket compression (60-80% reduction for JSON messages >128 bytes)
  • Standardize VISIBILITY prefix to use \x00[VISIBILITY] like all other protocol messages

Bandwidth

  • Separate equipment images from STATS messages (~500KB/min savings per player)
  • Send combat portraits only once per target, not every round (~100KB/round savings)