Repository navigation
Conversation
A token that the server rejects fails in every region. SignalClient::connect no longer starts the region fallback on a Client(401) from rtc/validate, and fetch_region_urls no longer serves an expired region list after the region endpoint returns a 401. A 403 still fails over, as in the JS SDK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Changeset ✓This PR includes a changeset covering all affected packages:
|
This was referenced Nov 21, 2026
When the dial failed without an auth status, for example because rtc/validate timed out, connect replaced a 401 from the region endpoint with the dial error. The engine then kept retrying the rejected token, because it stops only on Client(401|403). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
A token that the server rejects fails in every region, but
SignalClient::connectstill tried every region of a LiveKit Cloud project after a 401 fromrtc/validate. The region cache also served its expired list after the region endpoint returned a 401. The JS SDK stops on a 401 in both places.Change
SignalClient::connectreturns aClient(401)without the region fallback. A 403 still fails over, as in the JS SDK.RegionUrlProvider::fetch_region_urlsreturns a 401 even when it has an expired list.rtc/validatetimed out, and region discovery returns a 401,connectreturns that 401 instead of the dial error. The engine stops retrying only onClient(401|403).region_failoverdoc comment said that every error, including a 401, starts the fallback. It now names the 401 as the exception.Verified
cargo test -p livekit-signaling: 56 tests pass.connect_skips_region_fallback_on_401: the WebSocket upgrade andrtc/validatereturn 401, and the region endpoint serves a list. Without the change, the connect tries the region and returns that region's error.stale_regions_are_not_served_after_a_401: an expired list in the cache and a 401 from the fetch. Without the change, the expired list comes back.connect_returns_a_401_from_region_discovery: the dial fails with a 503,rtc/validatepasses, and the region endpoint returns 401. Without the change, the 503 comes back.🤖 Generated with Claude Code