Repository navigation
fix: hold signal messages until the ReconnectResponse goes out - #4827
Merged
Merged
Conversation
Clients take the ReconnectResponse as the first message on a resumed or migrated in signal connection, anything ahead of it is dropped. Hold messages back until it has been written. Co-Authored-By: Claude Opus 5 <[email protected]>
paulwe
approved these changes
Sep 1, 2026
Comment on lines
+85
to
+90
| if !isHandshake && (!s.params.Participant.IsReady() || s.HandshakePending()) { | ||
| s.params.Logger.Debugw( | ||
| "dropping message, connection has not opened yet", | ||
| "messageType", getMessageType(msg), | ||
| ) | ||
| return nil |
Contributor
There was a problem hiding this comment.
Queue only while the participant is not ready, that queue is always drained by the join or reconnect response. Log a dropped SDP, it leaves the negotiation waiting until the state machine recovers it. Co-Authored-By: Claude Opus 5 <[email protected]>
Queue participant updates while the handshake is pending again, and give the signaller a hook that fires when the connection opens, on an explicit open and on the handshake window expiring, so the queue always drains. Co-Authored-By: Claude Opus 5 <[email protected]>
Contributor
There was a problem hiding this comment.
Note
This report is out of date. Scroll down for Devin Review's latest report on this PR.
Devin Review found 2 new potential issues.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
Comment on lines
78
to
89
| // checked before taking the lock, opening the connection flushes the queue from here | ||
| handshakePending := p.signaller.HandshakePending() | ||
|
|
||
| p.updateLock.Lock() | ||
| if p.IsDisconnected() { | ||
| p.updateLock.Unlock() | ||
| return nil | ||
| } | ||
|
|
||
| if !p.IsReady() { | ||
| if !p.IsReady() || handshakePending { | ||
| // queue up updates | ||
| p.queuedUpdates = append(p.queuedUpdates, participantsToUpdate...) |
Contributor
The window ran only when something asked whether the handshake was pending, so a connection with nothing else to send held its queue. Reading the gate under the lock the flush takes closes the race where an update queued just after a flush. Co-Authored-By: Claude Opus 5 <[email protected]>
Stop cannot cancel a timeout that is already running, so tag each wait and let a timeout act only on its own. Count opens atomically in the test, the timer fires on its own goroutine. Co-Authored-By: Claude Opus 5 <[email protected]>
eleboucher
pushed a commit
to eleboucher/homelab
that referenced
this pull request
Sep 14, 2026
…6 ➔ v1.13.7) (#2108) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [docker.io/livekit/livekit-server](https://github.com/livekit/livekit) | patch | `v1.13.6` → `v1.13.7` | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/567) for more information. --- ### Release Notes <details> <summary>livekit/livekit (docker.io/livekit/livekit-server)</summary> ### [`v1.13.7`](https://github.com/livekit/livekit/releases/tag/v1.13.7) [Compare Source](livekit/livekit@v1.13.6...v1.13.7) ##### Added - Participant kind agent details ([#​4809](livekit/livekit#4809)) - report a reason on room-ended telemetry ([#​4815](livekit/livekit#4815)) - telemetry: support roomID change for a participant ([#​4816](livekit/livekit#4816)) - log telemetry guard details ([#​4817](livekit/livekit#4817)) - ingress: add opt-in support for udp\:// URL pull ingress ([#​4810](livekit/livekit#4810)) - Support VP9/AV1 simulcast ([#​4830](livekit/livekit#4830)) - add test-server support for compressed join requests ([#​4834](livekit/livekit#4834)) - wire psrpc bus compression into the message bus constructor ([#​4844](livekit/livekit#4844)) - turn: accept PROXY protocol on the TCP listener ([#​4852](livekit/livekit#4852)) - telemetry: add visibility into stats worker reference underflow ([#​4856](livekit/livekit#4856)) - rtc: add GetSubscribedDataTracks to LocalParticipant ([#​4862](livekit/livekit#4862)) ##### Changed - Skip the docker-backed service tests when there is no docker ([#​4799](livekit/livekit#4799)) - Wait for the callbacks these tests assert on. ([#​4803](livekit/livekit#4803)) - utils: make Median generic, overflow-safe, and add tests ([#​4553](livekit/livekit#4553)) - warp log ([#​4811](livekit/livekit#4811)) - Remove duplication within cpuload and sysload ([#​4818](livekit/livekit#4818)) - Update github.com/livekit/protocol digest to [`a469dd4`](livekit/livekit@a469dd4) ([#​4820](livekit/livekit#4820)) - update ice fork for warp ([#​4824](livekit/livekit#4824)) - Move data track packet serialization to protocol ([#​4829](livekit/livekit#4829)) - Update README to include snippet about Agents ([#​4808](livekit/livekit#4808)) - protocol update for SDP unmarshal hardening ([#​4836](livekit/livekit#4836)) - Update golang Docker tag to v1.26.7 ([#​4846](livekit/livekit#4846)) - README rewrite ([#​4837](livekit/livekit#4837)) ##### Fixed - Set up track info properly for dummy receiver. ([#​4807](livekit/livekit#4807)) - Do not escape the ICE server URI in the WHIP Link header ([#​4795](livekit/livekit#4795)) - fix: hold signal messages until the ReconnectResponse goes out ([#​4827](livekit/livekit#4827)) - Fix/reconcile data track subscription deadlock ([#​4843](livekit/livekit#4843)) - telemetry: drop unused getCPUStats, unblocking darwin builds without cgo ([#​4841](livekit/livekit#4841)) - update psrpc for subscription close goroutine leak fix ([#​4859](livekit/livekit#4859)) - telemetry: do not recreate a stats worker for a released guard ([#​4860](livekit/livekit#4860)) - Get participant by authed identity in WHIP participant service. ([#​4861](livekit/livekit#4861)) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Paris) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC44My4xIiwidXBkYXRlZEluVmVyIjoiNDQuODMuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUvY29udGFpbmVyIiwidHlwZS9wYXRjaCJdfQ==--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/2108
hbjydev
pushed a commit
to hbjydev/phoebe
that referenced
this pull request
Sep 14, 2026
…6 → v1.13.7) (#611) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [docker.io/livekit/livekit-server](https://github.com/livekit/livekit) | patch | `v1.13.6` → `v1.13.7` | --- ### Release Notes <details> <summary>livekit/livekit (docker.io/livekit/livekit-server)</summary> ### [`v1.13.7`](https://github.com/livekit/livekit/releases/tag/v1.13.7) [Compare Source](livekit/livekit@v1.13.6...v1.13.7) ##### Added - Participant kind agent details ([#​4809](livekit/livekit#4809)) - report a reason on room-ended telemetry ([#​4815](livekit/livekit#4815)) - telemetry: support roomID change for a participant ([#​4816](livekit/livekit#4816)) - log telemetry guard details ([#​4817](livekit/livekit#4817)) - ingress: add opt-in support for udp\:// URL pull ingress ([#​4810](livekit/livekit#4810)) - Support VP9/AV1 simulcast ([#​4830](livekit/livekit#4830)) - add test-server support for compressed join requests ([#​4834](livekit/livekit#4834)) - wire psrpc bus compression into the message bus constructor ([#​4844](livekit/livekit#4844)) - turn: accept PROXY protocol on the TCP listener ([#​4852](livekit/livekit#4852)) - telemetry: add visibility into stats worker reference underflow ([#​4856](livekit/livekit#4856)) - rtc: add GetSubscribedDataTracks to LocalParticipant ([#​4862](livekit/livekit#4862)) ##### Changed - Skip the docker-backed service tests when there is no docker ([#​4799](livekit/livekit#4799)) - Wait for the callbacks these tests assert on. ([#​4803](livekit/livekit#4803)) - utils: make Median generic, overflow-safe, and add tests ([#​4553](livekit/livekit#4553)) - warp log ([#​4811](livekit/livekit#4811)) - Remove duplication within cpuload and sysload ([#​4818](livekit/livekit#4818)) - Update github.com/livekit/protocol digest to [`a469dd4`](livekit/livekit@a469dd4) ([#​4820](livekit/livekit#4820)) - update ice fork for warp ([#​4824](livekit/livekit#4824)) - Move data track packet serialization to protocol ([#​4829](livekit/livekit#4829)) - Update README to include snippet about Agents ([#​4808](livekit/livekit#4808)) - protocol update for SDP unmarshal hardening ([#​4836](livekit/livekit#4836)) - Update golang Docker tag to v1.26.7 ([#​4846](livekit/livekit#4846)) - README rewrite ([#​4837](livekit/livekit#4837)) ##### Fixed - Set up track info properly for dummy receiver. ([#​4807](livekit/livekit#4807)) - Do not escape the ICE server URI in the WHIP Link header ([#​4795](livekit/livekit#4795)) - fix: hold signal messages until the ReconnectResponse goes out ([#​4827](livekit/livekit#4827)) - Fix/reconcile data track subscription deadlock ([#​4843](livekit/livekit#4843)) - telemetry: drop unused getCPUStats, unblocking darwin builds without cgo ([#​4841](livekit/livekit#4841)) - update psrpc for subscription close goroutine leak fix ([#​4859](livekit/livekit#4859)) - telemetry: do not recreate a stats worker for a released guard ([#​4860](livekit/livekit#4860)) - Get participant by authed identity in WHIP participant service. ([#​4861](livekit/livekit#4861)) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/London) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC44My4yIiwidXBkYXRlZEluVmVyIjoiNDQuODMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUvY29udGFpbmVyIiwidHlwZS9wYXRjaCJdfQ==--> Reviewed-on: https://git.hayden.moe/hayden/phoebe/pulls/611
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.
Clients take the ReconnectResponse as the first message on a resumed or migrated in signal connection and drop anything that arrives ahead of it, losing the ICE servers, server info and the reliable message sequence it carries.
A migrating in participant is now not ready until the response has been written, and a resumed connection holds messages back until then, opening on its own after 5s if a path sends no response.
🤖 Generated with Claude Code