Skip to content

Disable websocket pings so game SDK clients aren't dropped every 40s - #8

Merged
MutenCath merged 1 commit into
mainfrom
fix-ws-ping-disconnect
Oct 6, 2026
Merged

MutenCath merged 1 commit into
mainfrom
fix-ws-ping-disconnect

Conversation

@MutenCath

Copy link
Copy Markdown
Owner

Summary

  • Game logs showed SDK2 clients (Ancient Dungeon, Arken Age mod) disconnecting and re-authenticating on an exact 40-second cycle.
  • Cause: websockets.serve defaults (ping_interval=20, ping_timeout=20) — bHaptics game SDK clients never answer RFC6455 pings because the official Windows Player never sends any, so the server closed each connection after 40s.
  • Fix: ping_interval=None on both the SDK1 (15881) and SDK2 (15882) servers, matching real Player behavior. Only cost is that dead sockets linger until the next read fails, which is irrelevant on localhost.

Test plan

  • ruff check and py_compile pass
  • Play a native-integration game and confirm the journal no longer shows the 40s connect/disconnect cycle

🤖 Generated with Claude Code

bHaptics game SDK clients never answer RFC6455 pings (the official
Player doesn't send any), so the websockets library defaults
(ping_interval=20, ping_timeout=20) closed every game connection after
exactly 40 seconds, losing any haptic events fired during the reconnect
gap.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@MutenCath
MutenCath merged commit 94fbbee into main Oct 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant