Skip to content

Stability: drop ServerQuery-only register call + cap viewer default - #18

Merged
queueeee merged 1 commit into
mainfrom
claude/review-claude-md-iOuUt
May 1, 2026
Merged

queueeee merged 1 commit into
mainfrom
claude/review-claude-md-iOuUt

Conversation

@queueeee

@queueeee queueeee commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

Two stability fixes the live test exposed after the identity-persistence change:

  • Drop register_stream_notifications. Each startup was sending three servernotifyregister commands and getting error id=516 invalid client type back, because that command is for ServerQuery clients (type 1). Voice clients receive stream + channel notifications automatically. The bot worked anyway, but the log was noisy and a future debugger would burn time chasing the errors. The original ts6-manager port still uses the call because it runs as a ServerQuery client.

  • Cap STREAM_VIEWER_LIMIT default to 4. Each viewer gets its own VP8 encoder via the per-viewer RTCPeerConnection + MediaRelay subscription. Live measurement on 720p30: RSS went from ~110 MB (idle) to ~400 MB after one viewer joined. With -1 (unlimited), a small host would silently OOM-kill the container around the fourth or fifth viewer. Operators with the memory budget can bump it.

Test plan

  • pytest — 227 passed, 1 skipped (one less than before: removed the test for the deleted register_stream_notifications method).
  • mypy --strict clean.
  • ruff check clean.
  • Live: verify the error id=516 lines are gone from startup logs and that joining a viewer still works.

https://claude.ai/code/session_016DuCjRJK995Tj9aDhhB9at


Generated by Claude Code

Two unrelated stability fixes that surfaced after the live test of
identity persistence (PR #17):

* `register_stream_notifications` was sending three
  `servernotifyregister` calls during stream setup; each got a
  `error id=516 invalid client type` back from the server because
  that command is for ServerQuery clients (type 1) only. As a voice
  client (type 0) we receive stream + channel notifications
  automatically, so the call is dead weight that polluted the log
  on every startup. Drop the call site and the method; keep a
  comment so the next reader doesn't re-add it from the upstream
  ts6-manager port (which is a ServerQuery client and does need it).

* Each viewer spins up its own VP8 encoder via the per-viewer
  `RTCPeerConnection` + MediaRelay subscription. Live measurement
  on 720p30 showed RSS jumping from ~110 MB (idle) to ~400 MB after
  the first viewer connected - the unlimited default
  (`STREAM_VIEWER_LIMIT=-1`) would silently OOM-kill the container
  on a small host once a fourth or fifth viewer joined. Default
  cap to 4; the operator can bump it once they've measured.
@queueeee
queueeee merged commit 4cdcfc9 into main May 1, 2026
1 check 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.

2 participants