Repository navigation
fix(stv): 90 s WebRTC join timeout default; report a connection closed before sessionReady - #31
Merged
Merged
Conversation
… timeout default A direct-WebRTC session failed to wait long enough for sessionReady. The ``webrtc_join_timeout_s`` default of 10 s covered only the room join; the model's cold start alone can exceed 30 s, so most first sessions timed out. The default is now 90 s, and the README, example, and skill docs are updated. When the server closes the WebSocket before sending sessionReady without an errorResponse (e.g. a failed entitlement check), the client now queues a CONNECTION_CLOSED error with the WebSocket close code and reason instead of waiting silent until timeout. Co-Authored-By: Claude Fable 5.1 <[email protected]>
The WebRTC join timeout default (90s) and connection-close-before-sessionReady reporting fix the integration in fix/webrtc-session-ready-wait. Automated publishing requires a version bump to deploy these changes to production. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Two problems with how a direct-WebRTC session waits for
sessionReady.The default timeout was too short.
WebRTCSettings.webrtc_join_timeout_sdefaulted to 10 s, but the wait covers the model's cold start as well as the room join, and a cold start alone can take more than 30 s. The default failed sessions the server was about to start. It is now 90 s. An explicit value still wins.A connection closed before
sessionReadywas not reported. When the server closed without sending anerrorResponse(for example a failed entitlement check closing with1008 Insufficient funds), the WebSocket client waited forever and the WebRTC client waited out the whole join timeout, then blamed a timeout.OjinClientnow queues an error with codeCONNECTION_CLOSEDand the close code and reason, so both clients emit a fatalERRORat once. A servererrorResponsefollowed by a close still reports only the server's error.Also:
WEBRTC_JOIN_TIMEOUTmessage starts withTimed out:.examples/03-direct-webrtc(which hard-coded 30 s) follow the new default.Release
Bumps
ojin-clientto 0.12.1; the entries are under0.12.1inCHANGELOG.md. Merging publishes it to PyPI.Verification
uv run ruff format --check .,uv run ruff check .,uvx ruff check --select F,E9 examples: clean.uv run pytest: 293 passed.uvx pyright: 2 errors, both inentities/interaction_messages.py, which this PR does not touch.🤖 Generated with Claude Code