Use RequestResponse to report protocol handling errors (#3895)

* Send errors as necessary

* WIP

* WIP

* WIP

* WIP

* deps

* static check

* fix test

* test

* test

* logs
This commit is contained in:
Raja Subramanian
2025-09-04 11:27:07 +05:30
committed by GitHub
parent 98352fd0f9
commit 07c40cf349
16 changed files with 422 additions and 386 deletions
+4 -4
View File
@@ -157,8 +157,8 @@ func (p *ParticipantImpl) SendRefreshToken(token string) error {
return p.signaller.WriteMessage(p.signalling.SignalRefreshToken(token))
}
func (p *ParticipantImpl) SendRequestResponse(requestResponse *livekit.RequestResponse) error {
if requestResponse.RequestId == 0 || !p.params.ClientInfo.SupportErrorResponse() {
func (p *ParticipantImpl) sendRequestResponse(requestResponse *livekit.RequestResponse) error {
if !p.params.ClientInfo.SupportsRequestResponse() {
return nil
}
@@ -183,7 +183,7 @@ func (p *ParticipantImpl) HandleReconnectAndSendResponse(reconnectReason livekit
return err
}
if p.params.ProtocolVersion.SupportHandlesDisconnectedUpdate() {
if p.params.ProtocolVersion.SupportsDisconnectedUpdate() {
return p.sendDisconnectUpdatesForReconnect()
}
@@ -248,7 +248,7 @@ func (p *ParticipantImpl) sendTrackUnpublished(trackID livekit.TrackID) {
}
func (p *ParticipantImpl) sendTrackHasBeenSubscribed(trackID livekit.TrackID) {
if !p.params.ClientInfo.SupportTrackSubscribedEvent() {
if !p.params.ClientInfo.SupportsTrackSubscribedEvent() {
return
}
_ = p.signaller.WriteMessage(p.signalling.SignalTrackSubscribed(&livekit.TrackSubscribed{