Repository navigation
Hold a client's first client/state until its clock syncs - #349
Merged
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
maximmaxim345
force-pushed
the
docs/first-client-state-after-clock-sync
branch
from
November 4, 2026 19:19
e6cef9b to
e6bdefd
Compare
maximmaxim345
marked this pull request as ready for review
November 4, 2026 19:19
This was referenced Nov 5, 2026
maximmaxim345
added a commit
to Sendspin/sendspin-js
that referenced
this pull request
Nov 6, 2026
# What does this implement/fix? <!-- Quick description and explanation of changes. --> The player sent its first `client/state` with `available: false` until its clock synced. A server following the updated spec ungroups a client that opens with `available: false`, so the player would leave its group on every reconnect. The player now holds back its first `client/state` until its clock syncs and always reports `available: true`. Clients without the player role still send it right away. **Related issue or spec PR (if applicable):** - Sendspin/spec#349 ## Types of changes <!-- Tick exactly one box. CI (.github/workflows/pr-labels.yaml) applies the matching label, and the release notes use it to sort this change. --> - [x] Bugfix (non-breaking change which fixes an issue): `bugfix` - [ ] New feature (non-breaking change which adds functionality): `new-feature` - [ ] Enhancement to an existing feature: `enhancement` - [ ] Breaking change (changes the public API or the protocol in a way that is not backwards compatible): `breaking-change` - [ ] Refactor (no behavior change): `refactor` - [ ] Documentation only: `documentation` - [ ] Maintenance / chore: `maintenance` - [ ] CI / workflow change: `ci` - [ ] Dependencies bump: `dependencies`
This was referenced Nov 17, 2026
48 of 58 tasks
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 speaker that connects while it's playing from Bluetooth and reports
available: falsein its firstclient/statekeeps its group. Once it reportstrue, it joins that group's playback, which may already be running. The server can't fix this alone: today a player also reportsfalsewhile its clock syncs, so treating every firstfalseas unavailable would ungroup a speaker after every network blip.What changes
playerorsourcerole is active holds back its firstclient/stateuntil its time filter has converged, andavailableno longer says anything about clock sync. A firstfalsethen always means the client is busy.client/statewithavailable: falseas the client becoming unavailable. The client moves to a stopped solo group and rejoins only throughswitch.Player commands and other roles' binary data, such as artwork on a speaker with a display, now also wait for the clock to sync, since both wait for the first
client/state.Breaking changes
available: falseuntil its clock syncs has to hold back its firstclient/stateinstead.falsehas to treat it as unavailable.Clients need to update first. A server that updates before them moves those clients to a stopped solo group on every reconnect.