From c481396f5b0054200f1e0679d2459e06ad0dd655 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Mon, 23 Jun 2025 09:04:16 -0700 Subject: [PATCH] offer could be nil when migrating. (#3752) --- pkg/rtc/participant.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index 503b3229..bc97939a 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -993,6 +993,10 @@ func (p *ParticipantImpl) synthesizeAddTrackRequests(offer webrtc.SessionDescrip } func (p *ParticipantImpl) updateRidsFromSDP(offer *webrtc.SessionDescription) { + if offer == nil { + return + } + parsed, err := offer.Unmarshal() if err != nil { return @@ -2264,7 +2268,7 @@ func (p *ParticipantImpl) handleReceivedDataMessage(kind livekit.DataPacket_Kind p.pubLogger.Warnw("received unsupported data packet", nil, "payload", payload) } - // SFU typically asserts the sender's identity. However, agents are able to + // SFU typically asserts the sender's identity. However, agents are able to // publish data on behalf of the participant in case of transcriptions/text streams // in those cases we'd leave the existing identity on the data packet alone. if overrideSenderIdentity {